ValgrisFate / exampleHotel

NullPointerException should not be caught JAVA-E1070
Bug risk
Critical
2 years ago2 years old
Avoid catching NullPointerException
462              wish=sc.next().charAt(0); 
463        }while(wish=='y'||wish=='Y');  
464        }
465         catch(NullPointerException e)466            {
467                System.out.println("\nRoom not booked");
468            }