[求助]怎么读取从键盘中输入的字符并且读取到数组中,请用代码实现
[求助]怎么读取从键盘中输入的字符并且读取到数组中,请用代码实现
import java.io.*;
public class read{
public static void main(String[] args){
String[] str=new String[100];
while(index<100)
try{
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
str[i]=in.readLine();
}catch(Exception e){
e.printStackTrace();
}
index++;
}