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 is java transaction service (jts)?

717


What is the description for expression element?

716


What is java advanced?

654


Why java is interpreted language?

616


Which edition of java is used for web application?

666


What is the build file?

682


How do you run a java program?

656


Are java primitives objects?

614


What is j2ee application model?

635


Define hashtable in j2ee?

707


What is event in java?

627


I’m new to WebLogic Does anyone knows how to Deploy Application using

1933


Why tomcat is used in java?

650


What is javaserver pages standard tag library (jstl)?

652


What is asant?

772