Java: Int to String - how it works
You can use the Java programming language to solve many complicated problems. This practical tip shows you how to convert an integer into a string.
Convert int to string with Java integer to string
First of all you have to define an integer with a command such as "int a = 7;".
- To convert this integer into a string, you can use the command "Integer.toString (a);".
- Now you have successfully transformed the integer "a" into a string.
- If you found programming fun, you can read our Java programming guide here, in which we will teach you other practical commands.
In the next practical tip, we will explain how you can use classes in Java.