In the next line of code, does the compiler allocate memory to store 10 MyClass objects or 10 links?
MyClass[] arr= new MyClass[10];
In other words, do arrays only store references or the objects themselves?
Also, is the behavior different from primitive types?
source share