Java代码 收藏代码
String str = "1,2,3,4,5,6"
public int[] StringtoInt(String str) {
int ret[] = new int[str.length()];
StringTokenizer toKenizer = new StringTokenizer(str, ",");
int i = 0;
while (toKenizer.hasMoreElements()) {
ret[i++] = Integer.valueOf(toKenizer.nextToken());
}
return ret;
方法二、
Java代码 收藏代码
String a = "1,2,3,4,5,6"
String str[] = a.split(",");
int array[] = new int[str.length];
for(int i=0;i
相关阅读:
值类型、引用类型的区别
SharePoint Server 2013 Excel Web Access无法显示
SharePoint 2013报错之“指定的文件不是有效的电子表格或者没有包含要导入的数据”
SharePoint 2013备份方法整理
SQL 2005报错之Restore fail for Server 'DatabaseServerName'.
SQL Server 2012自动备份
SharePoint 2013在浏览器中打开pdf文档
摸鱼,搞RW
蛋疼的远程声音,这次用蓝牙试试看
Win10 IoT Core 更改密码(PowerShell)
原文地址:https://www.cnblogs.com/nucdy/p/5369769.html