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
Differentiate storage classes on the basis of their scope?
Is there a case when finally will not execute?
Explain throw keyword in java?
Which graphs are functions?
Explain some best practices you would apply while using collection in java?
How do you calculate square roots?
What do you mean by flow of struts?
What is an empirical question?
How do you override a variable in java?
What are the types of sockets in java?
What is bufferedreader in java?
Is there a jre for java 11?
What is string substring?
What is lambda in java?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?