Computer Science, asked by Sohamdonga8383, 18 days ago

What will be the output of the following program?
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); }
}

Answers

Answered by nallagondurevanth510
0

Answer:

folow me

Explanation:

20 and 10 is the answer.

Similar questions