Userdefined exceptions are always Runtime and when you write your own exception then it should extend any
java defined Runtime exceptions like Exception, FileNotFoundException etc.
Compile time errors are jdk level errors like syntax errors, identifier errors etc. Hope this helps.