将字符串数字转换为int类型数字

时间:2021-09-15 18:33:11   收藏:0   阅读:30

场景:

想要将字符串数字“01”转换为int类型的数字1,可使用Integer.parseInt();

 

举例:

String str  = "01";
int num = Integer.parseInt(str);

原文:https://www.cnblogs.com/js2086/p/15265589.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!