Java Converting a int to a string

The Integer Class have a static method toString that takes a int as input and gives us back a string.

int myInt = 1;
System.out.println(Integer.toString(myInt);

This is a log more efficient and nice in the long run than just concating the int with a empty string ( myInt + “” ) as that actually creates a bit of overhead. Not much, but still.