我需要使用字符串数组来列出课堂中使用的频率,
例子:
String names[] = new String [50];
然后我需要在位置后调用位置以插入名称。
例子:
String names[0], then names[1], names[2] ... names[50],
每个都有不同的名称并使用JOptionPane.showInputDialog ...
如果可能的话,我想从我停止的下一个位置继续插入数组
例子:
inserted names[0],[1],[2] then stop... now again inserting names[3],[4] and going on...
这是我现在所拥有的...
// reserved to use in menu loop
int option1=0;
int option2=0;
// array that will keep all the classrom students names
String names[] = new String [50];
//in need to find a way to fill position after position of the array with names
names[0] = JOptionPane.showInputDialog("Please, insert student name");
// in need to find a way to call next position in awway
names[1] = JOptionPane.showInputDialog("Please, insert student name");