Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package labbfyra;
- import java.io.BufferedReader;
- import java.io.File;
- import java.io.FileReader;
- import java.io.IOException;
- import java.io.Reader;
- import java.util.Scanner;
- public class Main {
- private static Reader fileReader;
- private static Object lineReader;
- public static void main(String[] args) throws IOException {
- // try {
- // Scanner readFromHere = new Scanner(new File ("C:\\java\\labbfyra\\src\\labbfyra\\Cd.txt"));
- // String line = readFromHere.nextLine();
- // System.out.println( line );
- try {
- FileReader filläsarn = new FileReader("skivor");
- String skivor = "C:\\java\\labbfyra\\src\\labbfyra\\Cd.txt";
- BufferedReader brIn = new BufferedReader(filläsarn);
- String record = null;
- while ((record = brIn.readLine()) != null) {
- }
- filläsarn.close();
- } catch (IOException e) {
- System.out.println("IOException error!");
- }
- String textLine;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement