美文网首页
String转int int转String

String转int int转String

作者: zealotabc | 来源:发表于2018-08-07 19:26 被阅读24次
    String转int
    String str = "123";
    int a = Integer.parseInt(str);
    
    String str = "123";
    int b = Integer.valueOf(str).intValue()
    
    int转String
    String s = String.valueOf( value); // 其中 value 为任意一种数字类型。
    
    String  s = 5+ "";
    

    相关文章

      网友评论

          本文标题:String转int int转String

          本文链接:https://www.haomeiwen.com/subject/uwaavftx.html