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 java flatmap?

670


In which language eclipse is developed?

695


How do I export a java project?

696


What is jar file in java?

748


Explain the common use of ejb?

872


What is the use of jprofiler?

680


What gives java it’s “write once and run anywhere” nature?

816


How do you check if java is installed on windows command prompt?

668


What is loose coupling in java?

677


In system.out.println(), what is system, out and println?

818


What is tuple2?

742


What is cache in java?

711


What is the use of rs next () in java?

705


What are the benefits of a jar file?

817


What is javax annotation generated?

671