Class with static method - Java Quiz Question


What will be the output of the following program?


A
Before swap method, num1 is 1 and num2 is 2
After swap method, num1 is 2 and num2 is 1
B
Before swap method, num1 is 1 and num2 is 2
After swap method, num1 is 1 and num2 is 2
C
Some other output
D
Compilation Error or Runtime Error