/** example 2 - shows that value field was initialized to null (cause it's an object) // shows that myNode is holding an address // shows that myNode.next was initialized to null // notice that the address of the second Node is different */ public class TestNode { public static void main (String [] args) { Node myNode, my2ndNode; Object myObject; myNode = new Node(); myObject = myNode.value; System.out.println (myObject); System.out.println (myNode.next); System.out.println (myNode); my2ndNode = new Node(); System.out.println (my2ndNode); } // end main } // end class