How to access a variable if it is declared as private?
Answer Posted / neo
You can access the private variable in to the other package
or other classes by inheritance . to inherite the super
classes all the resources comes in to sub classes private
also in this context.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What does 0 mean in boolean?
What is the difference between the prefix and postfix forms of the ++ operator?
What does system.gc() and runtime.gc() methods do?
Can you override a final method?
Is final static java?
What are the advantages of exception handling?
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
What is overriding in java?
What is the function of log?
What is contract between hashcode and equal method?
Will minecraft java be discontinued?
How many java versions are there?
Can you use this() and super() both in a constructor?
What is the main functionality of the remote reference layer?
What are the 6 functions?