码迷,mamicode.com
首页 > 移动开发 > 详细

Android中 字符串-数字 的转化

时间:2014-09-22 03:20:02      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:字符串   数字   android   

字符串-〉数字


String s;

int i;

i = Integer.parseInt(s);

数字-〉字符串

String s;

int i;

s = String.valueOf(i);

// 或者 s = Integer.toString(i);


本文出自 “zifangsky” 博客,请务必保留此出处http://983836259.blog.51cto.com/7311475/1556762

Android中 字符串-数字 的转化

标签:字符串   数字   android   

原文地址:http://983836259.blog.51cto.com/7311475/1556762

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!