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
Can we define static methods inside interface?
How does multithreading take place on a computer with a single cpu?
What is diamond operator in java?
When throws keyword is used?
What is an abstract class and what is it’s purpose?
How will you initialize an Applet?
What do you mean by JVM?
Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?
Write a code to create a trigger to call a stored procedure
What is Mutex (Mutual Exclusion Object) ?
How listener identify that the event came from a particular object?
What are the concepts of 'OOPS'?
how are methods defined?
When does a class need a virtual destructor?
What is the main use of generics in java?