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 are different types of inner classes ?
What is incompatible types in java?
What does the “final” keyword mean in front of a variable? A method? A class?
What is the difference between hashmap and hashtable? What is an interface?
What is meant by call by reference?
Explain java code for recursive solution's base case?
Explain the difference between string, stringbuffer and stringbuilder in java?
what is inner class in java?
Explain method overloading?
How to solve the problem of generating the unique hash keys with hash function?
What are loops in java?
Why java is call by value?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
Which number is denoted by leading 0x or 0x in java?
What is the difference between iterator and list iterator?