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
Explain the concepts involved in Object Oriented programming.
Why is abstraction needed?
What is abstract class in oop?
What is the difference between inheritance and polymorphism?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
write a C++ program for booking using constructor and destructor.
What is oops and its features?
What is the significance of classes in oop?
What is polymorphism give a real life example?
What is polymorphism and why is it important?
write a programe to calculate the simple intrest and compund intrest using by function overlading
What polymorphism means?
State what is encapsulation and friend function?
What is encapsulation with real life example?
What is inheritance write a program to show use of inheritance?