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 / sree

if the variable is private.Declare setter and getters to
the variable and access the varible using the setter and
getters in the other class

Is This Answer Correct ?    34 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are j2ee components?

450


What is included in j2ee?

494


What is authorization?

579


What are different modules in spring?

519


What is considered as a web component?

555






What is actionform?

541


Is j2ee and jee same?

496


What is authorization constraint?

539


How do I become a java developer?

483


Describe the file types *.ear, * .jar and *.war?

500


What is setbounds in java?

495


What is a java application client?

515


What is jradiobutton in java?

504


What is digest authentication?

544


What is button in java?

481