NSBPittman / BestHypothesis

Compare user's hypothesis to others and find the best match
0 stars 0 forks source link

learn how to use scanner objects to read in csv files in java #7

Open NSBPittman opened 8 years ago

tobydragon commented 8 years ago

public static String readFileToString(String filename) throws FileNotFoundException{ Scanner scanner = new Scanner( new File(filename) ); scanner.useDelimiter("\A"); String text = scanner.next(); scanner.close(); return text; }