Posts

Showing posts from December, 2020

Automation Interview Questions - 1

Image
Hello Folks, Hope you all are doing good and safe under the current situation. Hereby I'm presenting a few of the most commonly asked questions for the  Software Test Automation Interview - Java. This is going to be a long thread and would surely put up many such topics related to Interviews for your convenience. So, without wasting a second let us jump to the very first and most asked Question:      •  Swapping 2 numbers without using third variable int x = 10; int y = 20; System.out.println("Before Swap : X is "+x +" and Y is "+ y); x = x + y; y = x - y; x = x - y; System.out.println("After Swap : X is "+x +" and Y is "+ y); Output: Before Swap : X is 10 and Y is 20 After Swap : X is 20 and Y is 10 The logic used for 2 numbers say, 10 & 20 is X = X + Y = 10 + 20  = 30 Y = X - Y = 30 - 20 = 10 X = X -Y = 30 - 10 = 20 • Swapping 2 numbers using a va...