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 ejb container provider?

619


What is j2ee specification?

658


how to run servlet program between two computer through internet ?

2705


What is difference between javac and java?

695


What is B2B?

741


What is Document Object Model?

747


What are the main components of the j2ee application?

654


Is j2ee a framework?

671


What is j2ee technology?

717


Is java safe to download?

634


What is wildfly java?

662


What is java listener?

670


What is 'applet container' ?

760


What is ejb jar file?

627


What is tomcat in j2ee?

641