LogiQuest
Back to Objects and Classes
2

What is the output of the following program?

class Main {
    static void change(int v) { v = 100; }
    public static void main(String[] args) {
        int n = 1;
        change(n);
        System.out.println(n);
    }
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.