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

Why class is used in java?

490


What are the component of java?

471


What is java actionlistener?

482


What is DDP?

547


what is direct link to download swing ebook,applet,ejb,core java

2077






What does the web module contain?

573


What is java 2 platform, micro edition (j2me)?

521


What do you understand by j2ee?

491


What are the advantages in the use of spring for application development?

530


What is difference between javac and java?

509


What is a web container in j2ee?

516


What is event in java?

476


What is a jbutton in java?

526


Hi Friends. I want complete technical flow of j2ee project with following technologies. jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE layers .

4409


Is java part of oracle?

482