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 authorization?

590


What is mean by connection pooling?

547


What do you understand by business logic?

505


What is non primitive data type in java?

496


What should a junior java developer know?

479






Is java important for my computer?

482


What is j2ee api?

522


Is java is a technology?

523


how to run servlet program between two computer through internet ?

2549


Are java primitives objects?

469


What are j2ee technologies?

456


Is advanced java and j2ee same?

471


What is j2ee component?

510


How will you explain cdata?

559


What are struts?

518