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 / anant
The variable declared in class a should be directed available
in inner class because.
Getter and setter is also another way.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What is j2ee application model?
What do you understand by actionform?
I am newbie in J2EE & looking for strong basic behind each concept as, Why do we use private access specifier before each variable of type property bcoz ultimately to access it outside the class we use public method as getter & setter ? If we use getter & setter to access it outside the class so better we make variable as public so that it is easily available outside of the class... Please guide me why do we use as private ????
What is the difference between load() and get()?
What is business method?
Is java a tool?
Describe the file types *.ear, * .jar and *.war?
What is j2ee technology?
How to create object without using the keyword “new” in java?
What is home handle?
What is application configuration resource file?
What is awt package in java?
What is Connector architecture?
What is the difference between java and j2ee?
Is core java and j2se same?