Q51
What will be the output of the following Java code? class test int a; int b; test(int i, int j) a = i; b = j; void meth(test o) o.a *= 2; O.b /= 2; class Output public static void main(String args[]) test obj = new test(10 , 20); obj.meth(obj); System.out.println(obj.a + " " + obj.b);
A.
10 20
B.
20 10
AnswerC.
20 40
D.
40 20
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board