myseleniumtraining
This blog is for Automation Test Engineers
Home
Saturday, 2 September 2017
Swapping two numbers without using 3rd variable
int a=3;
int b=1;
a=a+b;//4
b=a-b;//3
a=a-b;//1
System.out.println("After Swapping the value of x will be:"+x "and y:" +y);
Email This
BlogThis!
Share to X
Share to Facebook
By Chai on September 02, 2017
0
Newer Post
Older Post
Home
0 comments:
Post a Comment
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment