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 is jit and its use?
What is java and why do we need it? Explain
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
How big is a 64 bit float?
What are the advantages of encapsulation in java?
Who is founder of java?
What are the problems faced by java programmers who don't use layout managers?
Does java arraylist maintain insertion order?
Explain methods specific to list interface?
How do you sort in java?
What does it mean that a method or field is “static”?
Which variables are stored in stack?
What is math floor in java?
What is return in java?
Explain an intermediate language?