A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

© xiaoya0o0o 中级黑马   /  2015-9-18 18:20  /  251 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

String 转换到 int的方式:
1.        通过Integer类的构造方法
2.        通过Integer类的intValue()方法
3.        通过Integer类的parseInt()方法
4.        通过Integer类的valueOf()方法
Int 转换到 String的方式:
1.        通过String类的构造方法
2.        通过String类的valueOf()方法
3.        通过Integer类的toSting()方法
4.        通过与字符串""相连接

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马