假设我有如下的一个txt文件
按行读取后,按照冒号进行分割
String [] strs=string.split(":"); strings [Integer.parseInt(strs[0])]=strs[1];