I am new to JAVAJava programming and have a couple of questionsquestion that I have been curious about. Any help will be appreciated :)
1)How does the differentiation betweenare private,public and package-private, protected, and public variables take place in JAVA behind the scenes/(actual stuff that goes inside the computer)?
2)How does JAVA differentiated behind the scenes, so as to keep private variables safe??
By safe I mean it's basic function as "notfor example, how does it make sure that private variables are accessible directly withoutonly to methods inside the object/class".class?
(Does JAVA has I want to know what actually happens inside the computer/JVM. Does Java have a different memory space for each of these types? andAnd if so and what makes itthe different memory spaces inaccessible? After all it is still in the memory right?)
NOTE:I want to know what happens actually "inside the computer/JVM/behind the scenes" and not just what each type of variable are used for.
Thank you in advance Thank you in advance :-):-)