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
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
What is the use of list in java?
What do you understand by an io stream?
How many bytes are a float?
Explain implementation and how is it different from conversion?
In the below example, how many string objects are created?
What is constructor and virtual function? Can we call a virtual function in a constructor?
Why is string buffer better than string ?
Is java util list serializable?
I want to persist data of objects for later use. What’s the best approach to do so?
What are sets in java?
How do you sort in descending order in java using collections sort?
What are the 3 types of loops in java?
What is entry set in java?
What is a package in java? List down various advantages of packages.