Jun 19, 2018 09:04 PM
(This post was last modified: Jun 19, 2018 09:14 PM by ๖ۣۜSaadi.)
Hello, I've just started learning Object-Oriented Programming in Java and am trying to get my basics right.
Anyways, had a couple of quick questions on "Classes & Objects":
--
Say a Class, which has only the main method:
Inside the main method, when we create new instances of the type of some other Class, are these "instances" known as "objects" or are they known as "variables"?
Moreover, when these 'instances' are 'made', where are they stored? The class with the main function, or the 'other' class with the constructor? What are the 'scopes' of these instances?
Thank you!
P.S; if this is the wrong forum, my apologies.
Anyways, had a couple of quick questions on "Classes & Objects":
--
Say a Class, which has only the main method:
Inside the main method, when we create new instances of the type of some other Class, are these "instances" known as "objects" or are they known as "variables"?
Moreover, when these 'instances' are 'made', where are they stored? The class with the main function, or the 'other' class with the constructor? What are the 'scopes' of these instances?
Thank you!
P.S; if this is the wrong forum, my apologies.



