V jednom řádku to nelze napsat? Něco jako:Scanner sc = new Scanner(new File("data.txt"));To je správně ne?