write a code in jsp to swap two numbers?

Answer Posted / rakesh.fanu

class SwapingTest
{
public static void main(String xx[])
{
int a,b,temp;
a=10;
b=20;
System.out.println("Before Swaping :-");
System.out.println("Value a is "+a);
System.out.println("Value b is "+b);
temp=b;
b=a;
a=temp;
System.out.println("After Swaping :-");
System.out.println("Value a is "+a);
System.out.println("Value b is "+b);
}
}

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by java se?

704


Explain different way of using thread?

772


What are tlds in java?

674


What is gpt and gpc? : java security

739


What are struts java?

682


What is the purpose of jdk?

618


What is ibatis in java?

693


Explain suspend() method under thread class>

834


What is @qualifier in java?

704


Which method is used to create the daemon thread?

732


What is the java virtual machine (jvm)?

843


can anyone tell me what kind of questions are asked for core java exam in aptech

1637


What is a cookie in java?

727


What is meant by annotations in java?

696


How do I install eclipse?

693