If you are interested there is an alternative way of doing the conversion beside String + int. which is calling this method String.valueOf(int i) This method will return a String data type
That is correct. When you concatenate (use the + operator on) two values and one of them is a
String it will try to convert the other value to a
String as well before it combines them.
It doesn't matter if it is
int or even some other datatype than
int, as long as one of the values is a
String it will try to convert the other value into a
String as well.