Can we access private data outside of the class directly in
java programming language? Why There is no runtime checking
in java, which leads to access the private data directly
outside of a class?
Answer Posted / chaitali
No,we cannot access private data outside of class in java.
There is only compile time checking and no runtime check in
java because Java supports concepts like Polymorphism and
reflection where on runtime certain decisions are taken
| Is This Answer Correct ? | 14 Yes | 14 No |
Post New Answer View All Answers
What is the default value of the local variables?
Where are register variables stored?
Why are lists ordered in java?
Can we overload the methods by making them static?
How big is a gigabyte?
What is the purpose of static methods and static variables?
What is the java reflection api? Why it’s so important to have?
What do you mean by data type?
Explain the features of interfaces in java?
What is array class in java?
How do you invoke a method?
What is a local class in java?
Can we access instance variables within static methods ?
What is a class in java?
What data type is a string?