不知道具体怎么实现
输入格式 :姓名 分数
int index = "张三总分:100".indexOf(":");//返回“:”的第一个位置的索引4
Scanner scanner = new Scanner(System.in);
while(scanner.hasNext()){
String score = "张三总分:100".substring(index+1);
//对字符串进行截取“100” ,取5,6,7 不包括4
int score2 = Integer.parseInt(score);//将字符串分数转换成整数类型
int index2 = "张三总分:100".indexOf("总分");//返回2
String name2 = "张三总分:100".substring(0,index2);//对字符串进行截取“张三”,取0,1 ,不包括2
String name = scanner.next();
int score = scanner.nextInt();
统计 学生的的总分,相同名字分数累加,并用数组存储
存储格式 :张三总分:100
每次输入一次学生成绩,打印所有存储信息(注意不要打印默认null值)
提供api使用方式:
index索引编号:0 1 2 3 4 5 6 7
张 三 总 分 : 1 0 0
```java
```
张三和分数用个对象存呗