So in class my teacher was saying that both lines 2 and 3 pass in a reference to an object.
I asked her why isn't line 3 passing in an object directly and I wasn't very convinced by her argument.
Can you please tell me whether she was right or wrong, and provide some sort of proof for either case?
JFrame frame = new JFrame();        //line 0
JLabel label = new JLabel("hello"); //line 1
frame.add(label);                   //line 2
frame.add(new JLabel("goodbye"));   //line 3
 
     
    