我想做一个字符列表的数组。现在我有这个密码:
Scanner scannerMcScannersonTM = new Scanner(System.in); //This is trademarked.
String[] inputs = new String[5];
List<List<char>> list = new ArrayList<List<char>>();
for(int i =0; i < inputs.length; i++){
System.out.println("Enter pair number " + (i+1) + " separated by a space");
inputs[i] = scannerMcScannersonTM.nextLine();
for(int j = 0; j < inputs[i].length(); i++){
list[i] = inputs[i].toChar(); //it is clear that I don't know what I am doing lol
}
}
谢谢你的帮助!:d
1条答案
按热度按时间egdjgwm81#