[Solved] Object Array Initialization [duplicate]
Variables and array elements are all references to objects. They are not the actual objects. To illustrate, I’ll “name” actual objects using a number scheme, e.g. #1 is the first object. Your code runs as follows: Class is initialized by the JVM, and root1, root2, and root3 are all null. Node root[]={root1,root2,root3} is executed and … Read more