+91-85006-22255
What will be the output of the following program?
class MethodCalls { public static void main(String[] args) { a1(8); } static int a1(int a1) { System.out.print(" a1 = " + a1); return a2(a1++); } static int a2(int a2) { if (a2 == 0) { return 10; } System.out.print(" a2 = " + a2); return a1(a2 / 2); }}
Topic: Static and Non Static Variables - Static and Non Static Methods
Read this topic Take test on this topic
Open In App