Advertisement
inferno719

Untitled

Sep 30th, 2011
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package lab5;
  6. import java.io.*;
  7. import java.util.Scanner;
  8. import java.util.*;
  9.  
  10. import java.*;
  11. /**
  12.  *
  13.  * @author rherman
  14.  */
  15. public class Lab5
  16. {
  17.     /**
  18.      * @param args the command line arguments
  19.      */
  20.     public static void main(String[] args) throws IOException
  21.     {
  22.         System.out.println("Main starts");
  23.         //String filename = "input.txt";
  24.         // TODO code application logic here
  25.        
  26.         System.out.println("Reading start.");
  27.         File file = new File("input.txt");
  28.         Scanner in = new Scanner(file);
  29.         //BufferedReader in2 = new BufferedReader(new FileReader("C:\\input.txt"));
  30.         String text = in.nextLine();
  31.         System.out.println(text);
  32.         in.close();
  33.         //System.out.println(in);
  34.        
  35.     }
  36. }
  37.  
  38.  
  39.  
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement