fork download
  1. class Exception {
  2. public static void main(String[] args){
  3. try {
  4. throw new notAdultException();
  5. } catch(notAdultException e){
  6. System.out.println(e);
  7. }
  8. }
  9. }
  10. class notAdultException extends java.lang.Exception {
  11. @Override
  12. public String toString(){
  13. return "you are not adult";
  14. }
  15. }
Success #stdin #stdout 0.06s 32464KB
stdin
Standard input is empty
stdout
you are not adult