2. Write the output of the following program. If m=2 and n=3. What would be the value of a and b. Explain with reasons.
class x
{
int a,b;
x(int m, int n)
{arm++ + ++m;
b=n++ + --n/m++;
x()
{
System.out.print("Value of a="+a);
System.out.print("\nValue of b="+b);
}
}
Answers
Answered by
0
Explanation:
Value of a= 2+4=6
Value of b= 3+3/2 = 9/2 = 4.5
Similar questions