why i can not access private variable in other class?
Answer Posted / srihari
private variables are visible within the class they are
defined but not in the other classes present in same package
& classes in different packages. Hence, we call "private"
variables as "CLASS-LEVEL" instances.
private variables are used when we do not want the variable
declared in a class to be shared or used by other classes
present in same packages or different packages.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain different way of using thread?
What is a java proxy?
Is lambda functional programming?
What is the difference between jar and executable jar?
How do I run a project in netbeans?
Do I need both jdk and jre?
Which instutute is offering course for rhino jain slee
In java thread programming, which method is a must implementation for all threads?
What are tlds in java?
What is @override annotation in java?
What is java language expression?
What is the locale class?
Which is more secure: java or activex? : java security
How do javabeans work?
What are the benefits of a jar file?