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
Advantage and disadvantage of routing in telecom sector
is there any choice in opting subjects like 4 out of 7
Why do we use encapsulation in oops?
What is cohesion in oop?
#include
What is abstraction in oop with example?
What is abstraction with example?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is polymorphism what is it for and how is it used?
What is encapsulation c#?
What is abstraction in oops with example?
What does oop mean in snapchat?
What is class encapsulation?
what is the drawback of classical methods in oops?
What is static in oop?