Java Int to String

  • + 0 comments

    import java.util.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in .nextInt(); String s =Integer.toString(n); if (n == Integer.parseInt(s)) { System.out.println("Good job"); } else{ System.out.println("Wrong answer."); } } }