Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package javaapplication8;
  7. import java.io.File;
  8. import java.io.FileNotFoundException;
  9. import java.util.Scanner;
  10.  
  11. /**
  12.  *
  13.  * @author MichalWochnik
  14.  */
  15. public class JavaApplication8 {
  16.  
  17.     /**
  18.      * @param args the command line arguments
  19.      */
  20.     public static void main(String[] args) throws FileNotFoundException {
  21.        
  22.       File file = new File("C:/Users/MichalWochnik/Documents/NetBeansProjects/JavaApplication8/src/javaapplication8/litwo.txt");
  23.       Scanner in = new Scanner(file);
  24.       int i=0, b=0;
  25.       while(in.hasNext() != false)
  26.       {
  27.          String zdanie = in.nextLine();
  28.           System.out.println(zdanie);
  29.       }
  30.      
  31.      
  32.      
  33.         // TODO code application logic here
  34.     }
  35.    
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement