Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.nio.file.Paths;
- import java.util.Scanner;
- public class test1 {
- public static void main(String[] args) throws IOException {
- Scanner in = new Scanner(Paths.get("c:\\Users\\Kimes\\Desktop\\test.txt"));
- while(in.hasNextLine()) {
- System.out.println(in.nextLine());
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment