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
Does java map allow duplicates?
Write a program to search a number in the given list of numbers.
How is java created?
What is meant by class?
How do generics work in java?
What is the use of using enum to declare a constant?
Can an interface extend another interface?
Can a class be declared as protected?
This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }
Can a class extends itself in java?
How do you reverse a list?
Can we override constructors in java?
What is the use of object and class classes?
What is parsing a string?
What is the difference between Java1.4 and Java1.5