方法
import java
public class TestSplit {
public static void main(String[] args) {
String orignString = new String(
String[] testString = orignString
int[] test = {
//String to int
for (int i =
test[i] = Integer
}
//sort
Arrays
//asc sort
for (int j =
System
}
System
// desc
for (int i = (test
System
}
}
}
方法
import java
import java
public class SplitStringTest {
public static void main(String[] args) {
String s = new String(
int length = s
//split s with
StringTokenizer commaToker = new StringTokenizer(s
String[] result = new String[untTokens()];
int k =
while (commaToker
result[k] = commaToker
k++;
}
int[] a = new int[result
for (int i =
a[i] = Integer
}
//sort
Arrays
//asc sort
for (int j =
System
}
}
}
From:http://tw.wingwit.com/Article/program/Java/gj/201311/27344.html