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


Please Help Members By Posting Answers For Below Questions

What is return null in java?

503


According to java operator precedence, which operator is considered to be with highest precedence?

593


What is field name?

578


What is difference between static and final?

550


Do I need java on my computer?

522






Is binary a low level language?

493


Explain the transient field modifier?

560


What does a za z0 9 mean?

558


What is mnemonic in assembly language?

545


Can a class be private in java?

535


What is an image buffer?

531


What is a local class in java?

575


What are static blocks in java ?

603


What is data structure in java?

525


Does collectionutils isempty check for null?

803