Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How java converts int into string
How java converts int into string
Java int type conversion String type methods are: using int i+ "",using String.valueOf (), directly forcing type conversion.

The specific conversion steps are as follows:

1, first open the software eclipse;;

2, we can use int I+""; "; Can complete the conversion, that is, any number+""a string equals a string;

3. You can also use the type conversion method of String.valueOf () to put the object to be converted in this bracket. For example: Boolean bool = true strings = string.valueof (bool);

4. You can also directly force type conversion, such as int Myint =1234; ; string MyString = " "+MyInt; That is, put a bracket before the object to be converted, and put the converted type in brackets.