Kimes

Untitled

Oct 23rd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. import java.io.IOException;
  2. import java.nio.file.Paths;
  3. import java.util.Scanner;
  4. public class test1 {
  5.  
  6.     public static void main(String[] args) throws IOException {
  7.  
  8.         Scanner in = new Scanner(Paths.get("c:\\Users\\Kimes\\Desktop\\test.txt"));
  9.        
  10.         while(in.hasNextLine()) {
  11.             System.out.println(in.nextLine());         
  12.        
  13.         }
  14.         in.close();
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment