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
Can we create an object of static class in java?
what is anonymous class in java?
Can final class have constructor?
Can we create more than one object singleton class?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
Why main method is called first in java?
How does enum work in java?
Can we force the garbage collection to run?
Implementations of set interface?
Explain when we should make an instance variable private.
What is an exception in java?
Can java cast null?
What are the elements of java?
What do the thread?class methods run() and start() do?
Why isn’t there operator overloading?