Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.Scanner;
- public class OpiskelijatTiedostossa {
- public static void main(String[] args) throws IOException {
- Scanner file = new Scanner(new File("opiskelijat.txt"));
- String rivi;
- System.out.println("Kurssin opiskelijat: ");
- while(file.hasNextLine()) {
- rivi = file.nextLine();
- System.out.println(file.nextLine());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement