?? questionreader.java
字號(hào):
package com.tarena.exam.util;
import java.io.BufferedReader;
import java.io.IOException;
import com.tarena.exam.model.Question;
public class QuestionReader {
private BufferedReader br;
public QuestionReader(BufferedReader br){
this.br=br;
}
public Question readQuestion() throws IOException{
String[] str=new String[5];
str[0]=br.readLine();
if(str[0]==null){
return null;
}
for(int i=1;i<str.length;i++){
String s=br.readLine();
if(s==null){
throw new IOException("文件格式不正確!");
}
str[i]=s;
}
return new Question(str);
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -