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
|
822 Discussions
|
Please Login in order to post a comment
The challenge for me was understanding what was available and already defined.
After trying to create a new variable "n" and seeing an error that it already exists, that simplified the solution to just one line of code ;)
import java.io.; import java.util.;
public class Solution {
}
I have tried in two diffrent ways in case i forget the method
String s = ""+n;
with method
String s = String.valueOf(n);
Hope it helped
It’s a confidence-building exercise for beginners and a solid reminder that mastering small fundamentals is key to progressing in Java programming. Telugu 365
String s = String.valueOf(n);