Java Int to String

  • + 0 comments
    try {
       Scanner in = new Scanner(System.in);
       int n = in .nextInt();
       in.close();
       //String s=???; Complete this line below
        String s =Integer.toString(n);
       
       if (n == Integer.parseInt(s)) {
        System.out.println("Good job");
       } else {
        System.out.println("Wrong answer.");
       }
      } catch (DoNotTerminate.ExitTrappedException e) {
       System.out.println("Unsuccessful Termination!!");****