我有一个List
很长的Strings
:
test:test:test:test:test:test:test:ABC:test:test:test:test:test:test:
test:test:test:test:test:test:test:DEF:test:test:test:test:test:test:
test:test:test:test:test:test:test:GHI:test:test:test:test:test:test:
test:test:test:test:test:test:test:JKL:test:test:test:test:test:test:
test:test:test:test:test:test:test:MNO:test:test:test:test:test:test:
假设所有测试彼此不同。我想根据大写字母所在的特定位置对这些字符串进行排序。
for (int i = 0; i < aList.size(); i++) {
System.out.println(list.get(i).toString().split(":")[7]);
}