The number of variables

Report a typo

How many variables (both local and method parameters) will be on the stack before exiting the printSum method?

public class MyClass {
    public static void main(String args[]) {
        int x = 10;
        int y = 20;
        printSum(x, y);
    }
    
    public static void printSum(int x, int y) {
        System.out.println(x + y);
        // you are here
    }
}
 
Enter a number
___

Create a free account to access the full topic