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 are namespaces in java?
What is the final variable?
What are keywords in programming?
What is a stack class in java ?
Why do we declare a class static?
How do I write a self declaration?
What do you mean by scope of variable?
Why is whitespace important?
Explain the difference between string, stringbuffer and stringbuilder in java?
What is the use of optional ?
Write a method that will remove given character from the string?
What does @override mean?
How do you add spaces in java?
Explain working of call by reference function invoking.
What is a for loop in java?