Java tutorial
import java.io.File; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(new File("c:/text.txt")); System.out.println(scanner.nextLine()); scanner.close(); } }