Monday, January 14, 2019

java - What happens when you create a new object?

Ok, so what happens when you do this.




A a1=new A();

A a2=new A();

A a3=new A();


I upload two pictures on how I imagine it being like. Can you tell me what picture is true?



First picture:

enter image description here



Second picture:
enter image description here



I always thought the first picture is true, but now I don't really know, and I suspect the second to be true.



Also, can you explain to me what each side does?
Like, what does "A a1" do and what does "new A()" do?




Thanks.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...