Cannot print File
Hey! I wrote this code for a simple vocab trainer. I'm new to Files, thus this is a rather intricate affair. :/ The problem is that the System.out.println does not work. It says: No suitable method found for println() import java.util.*; import java.io.*; import java.lang.*; public class Vocabs { private Formatter form; private Scanner sc; public void openFile() { try{ form = new Formatter("vocabs.txt"); sc = new Scanner(new File("vocabs.txt")); } catch(Exception e) { System.out.println("An error occured"); } } public void addVocab() { form.format("%s%s%s","one ","en ","sounds like and"); } public void closeFile() { form.close(); } public void readFile() { while(sc.hasNext()) { String LangA = sc.next(); String LangB = sc.next(); String Hint = sc.next(); System.out.println("%s%s%s%n", LangA, LangB, Hint); } } }