import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class FilLeser { String strengen = ""; FilLeser(File fil) throws FileNotFoundException { lesFraFil(fil); } void lesFraFil(File fil) throws FileNotFoundException{ Scanner sc = new Scanner(fil); strengen += ""; while (sc.hasNextLine()) { strengen+= sc.nextLine() + "
"; } strengen += ""; } String hentStreng() { return strengen; } }