LogiQuest
Back to Garbage Collections
3

What is the output of the following program?

class Main {
    public static void main(String[] args) {
        Object a = new Object();
        Object b = a;
        a = null;
        System.out.println(b != null);
    }
}
Easy

Discussion (0)

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

Log in to join the discussion.