Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How Java converts int into String
How Java converts int into String
Int is a basic data type and cannot be directly converted to string type, but it can be converted in the following ways:

Add with strings, such as int I =10; String? s = " "+I;

Call apiString.valueof (i) provided by string; What you get is a string type.

Use the wrapper class of int, or you can use Integer.toString ().