True & flase Statements
Posted on 2002-04-17
hi..i need to know if the following sentences are true or false..and why? simple explanation plz
1) subclass variables should be defind as private to hide them from other subclasses. ( )
2) main method can't directly access any non static method and varibales,but using the instance of the class it can.!!!!!!
my comments or concerns..for the following :
1) i guess it should be true.. cuz of the encapsulation.. am i right..or it's not forced to be private .. only it's a better way to hide variables.. ?!?!!/ i'm not sure.just giving what i know..and waiting for ur answer
2) but why other static methods can't use instance of the class?!?!!?
hope i've made myself clear enough to get ur answers..
i'll be waiting..