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
Is arraylist zero based?
Can you pass functions in java?
Can we override singleton class?
When should a function throw an exception?
What is the base class in java from which all classes are derived?
What do you mean by synchronized non access modifier?
What do you understand by looping in java? Explain the different types of loops.
What is a generic code?
What is anonymous inner class?
What is Hierarchy of exception?
What is generic type?
What is qualitative variable?
What is an empty class? What functionality does it offer in Java?
What is the static keyword?
Why constructor has no return type?