We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java Int to String
- Discussions
Java Int to String
Java Int to String
Sort by
recency
|
770 Discussions
|
Please Login in order to post a comment
yo lo hice de la siguiente manera try { Scanner in = new Scanner(System.in); int n = in.nextInt(); in.close();
String s = Integer.toString(n);
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."); } } }
String s = n+"";