コード例 #1
0
 public static Answer create(File file) throws java.io.FileNotFoundException {
   Answer a = new Answer();
   // Read file into string
   System.out.println("File to be read: " + file.getAbsolutePath());
   a.text = new Scanner(file).useDelimiter("\\Z").next();
   return a;
 }
コード例 #2
0
 public static Answer create(String text) {
   Answer a = new Answer();
   a.text = text;
   return a;
 }