Sort 276 Discussions, By:
Please Login in order to post a comment
Here are 3 ways to convert an int to a String
String s = String.valueOf(n);
String s = Integer.toString(n);
String s = "" + n;
From my HackerRank Java solutions.
I assume this problem was incorrectly marked as Difficult.
I thought I had to write the entire program. I didn't know that code was hidden under the ...'s. So it took me about a half an hour!
a single line of code can get you your 10 points.....teeheee