how to swap to variables without using thrid variable in java?
Answer Posted / mani
int x = 15;
int y = 20;
System.out.println(x+" "+y);
x ^= y;
y ^= x;
x ^= y;
System.out.println(x+" "+y);
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is an example of genetic polymorphism?
what are the different types of qualifier in java?
Give two or more real cenario of virtual function and vertual object
How to hide the base class functionality in Inheritance?
What is an advantage of polymorphism?
2. Give the different notations for the class.\
Explain the advantages of inheritance.
What is polymorphism explain its types?
What are the features of oop?
What is inheritance write a program to show use of inheritance?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is difference between oop and pop?
What are the data types in oop?
What are the benefits of oop?
What is ambiguity in inheritance?