There are 2 classes . Class A and Class B. In Class A i declared
a variable in private. if we can access this private variable in
Class B. If yes means , how we can access ?
Answer Posted / sudhakar
private variables are not accessible by the subclasses, either the class B should be the inner class of class A or we have to go through the java reflection api.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is credentials?
What is a panel java?
What is j2ee api?
What do you understand by connector? Explain connector architecture.
What are the main components of a class in java?
What is use of final keyword in java?
Is visual studio good for java?
What is java servlet container?
What is api in j2ee?
What is build file?
What are struts?
How many types of modules is defined by j2ee specification?
Which package is imported by default in java?
Why is java used?
What is a j2ee container?