532628838
圣骑士
圣骑士
  • 注册日期2011-06-10
  • 发帖数98
  • QQ
  • 火币517枚
  • 粉丝77
  • 关注39
阅读:3833回复:0

字串 String 转换成整数 int

楼主#
更多 发布于:2011-08-01 16:30
我们有两种方法俩实现将字串 String 转换成整数 int,下面为大家一一介绍:
1). int i = Integer.parseInt([String]); 或 i = Integer.parseInt([String],[int radix]); 2). int i = Integer.valueOf(my_str).intValue();

 2 如何将整数 int 转换成字串 String ? A. 有叁种方法: 1.) String s = String.valueOf(i); 2.) String s = Integer.toString(i); 3.) String s = "" + i;


喜欢0 评分0
游客

返回顶部