You will often need to turn a number into a string or parse a string into a number. Java provides static methods for both directions.
To convert a number to a string, use String.valueOf():
int num = 42;
String s = String.valueOf(num);
System.out.println(s.length());
This prints because the string "42" has characters. You can also concatenate with an empty string ("" + 42), but String.valueOf() makes your intent clearer.
To convert a string to a number, use the parsing methods on the wrapper classes:
String text = "123";
int value = Integer.parseInt(text);
double decimal = Double.parseDouble("3.14");
If the string does not contain a valid number, these methods throw a NumberFormatException. For example, Integer.parseInt("abc") crashes at runtime. Always validate or wrap the parse in a try-catch if the input comes from a user.