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 is the main function in java?
What is your platform’s default character encoding?
What function extracts specified characters from a string?
Why unicode is important?
Why does java have two ways to create child threads?
What is polymorphism java example?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
explain autoboxing in java?
How is a variable stored in memory?
Differentiate between a constructor and a method? Can we mark constructors final?
What is instance means in java?
How does a for loop work?
How do you create a sop?
What is the difference between object oriented programming language and object based programming language?
What is a singleton in genetics?