0
Simple question about java objects.
maby im sleepy but after you create an instance of class does a declared variable in class become an object of class after initializing it with an instance of class? example public Class House{ public String bricks; main... bla bla House h = new House(); << instance of class House h.bricks = "Red"; |_______________ | | is this all an object now? or is it just h pointing?
4 ответов
+ 2
h is the only object, bricks is a property of the object.
+ 1
yeah thats essentially what it does if im understanding what you mean.
+ 1
no probs thank u
0
does the object just point at the instance to give it a value?