Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. package labbfyra;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.File;
  5. import java.io.FileReader;
  6. import java.io.IOException;
  7. import java.io.Reader;
  8. import java.util.Scanner;
  9.  
  10.  
  11. public class Main {
  12. private static Reader fileReader;
  13. private static Object lineReader;
  14.  
  15. public static void main(String[] args) throws IOException {
  16. // try {
  17.  
  18. // Scanner readFromHere = new Scanner(new File ("C:\\java\\labbfyra\\src\\labbfyra\\Cd.txt"));
  19. // String line = readFromHere.nextLine();
  20. // System.out.println( line );
  21.  
  22. try {
  23. FileReader filläsarn = new FileReader("skivor");
  24. String skivor = "C:\\java\\labbfyra\\src\\labbfyra\\Cd.txt";
  25. BufferedReader brIn = new BufferedReader(filläsarn);
  26. String record = null;
  27. while ((record = brIn.readLine()) != null) {
  28.  
  29. }
  30. filläsarn.close();
  31. } catch (IOException e) {
  32. System.out.println("IOException error!");
  33. }
  34.  
  35. String textLine;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement