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


Please Help Members By Posting Answers For Below Questions

What is the J2EE module?

615


What are the java backend technologies?

484


Explain connector architecture.

544


What do you understand by a thin client?

508


What is java netbeans?

495






What is the difference between java and j2ee?

448


What is element?

544


What is deployment descriptor?

578


What is a j2ee module?

532


How to invoke stored procedure in hibernate?

494


On which platform j2ee is based?

528


What are defined as web components?

514


i want test pattern of zylog company and some examples also

2301


What is authorization constraint?

550


Define the struts in the j2ee framework?

508