The question is published on by Tutorial Guruji team.
I read about Checked exception that it is checked by compiler , but its runtime only.
Is it correct?
If it is correct then how?
Checked exceptions are checked at compile time to ensure you are handling them, either by catching them or declaring the containing method
throws the exception.
At runtime, there is no distinction between checked and unchecked exceptions: they are treated identically by the JVM. So “checked-ness” is purely a compile-time concept.