java in each conversion type String and int

String String type is converted into an integer int 1) int i = Integer.parseInt ( [String]);. Or i = Integer.parseInt ([String], [int radix]);. 2) int i = Integer.valueOf ( my_str) .intValue (); Note: string converted to Double, Float, Long similar method how to convert an integer to a character string string int the following three methods are: 1.) string s = String.valueOf ( i) ; 2.) string s = Integer.toString ( i); 3.) string s = "" + i; Note: Double, Float, Long method translated into strings of similar reference: [. 1].. HTTP: // blog.minidx.com/2008/01/21/432.html

Reproduced in: https: //my.oschina.net/itfanr/blog/195633

Guess you like

Origin blog.csdn.net/weixin_34348174/article/details/91799393
Recommended