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
Why sun introduce concept of anonymous class? What is need and real life use of anonymous class
What are the new features about Java se 8 ?
What java systems libraries and methods are available for me to use?
In a barber shop there are 2 doors. customer come in 1 door, leave in other. minimum # of chairs. barber spend his life in cutting. always barber can cut 1 customer. few chairs in the shop. if barber busy customer waits, if chairs full, customer leave. if no customer, barber sleeps. treat barber and customer as 2 threads. you can use Semaphore class with arrive and depart and count as parameter.
What are tags in java?
What do you understand by casting in java language? What are the types of casting?
How do I open my java console?
What does jpa mean?
Why bean class is used in java?
What is the difference between the boolean & operator and the && operator?
there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
Does netbeans need jdk?
What is the difference between a while statement and a do statement?
What is the difference between deep copy and shallow copy in java
What is the point of lambda expressions?