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 / puneet
This is a compile time activities, the scopes and the access
issues are handled at the compile time and this exception is
not the subclas of the runtime exception class and doesnt go
unchecked during compile time, they are checked at compile
time and the compile time exceptions are checked exceptions
which are checked by the compiler before hand and the
example of runtime exception is say bad logic like array
having -ve size and division by zero where actual excecution
occurs in JRE of the byte code.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What's the difference between comparison done by equals method and == operator?
What is initial size of arraylist in java?
What is the function of java?
Why is static used?
What is meant by method overriding?
What is the driver class?
What is a war file?
What is meant by nested loop?
What is the purpose of using java.lang.class class?
What is entry set in java?
What is the use of hashmap in java?
How do you compare values in java?
What is the difference between java applets and applications?
Explain thread in java?
What is the function of http?