Code:
import java.util.*;
import java.io.*;
class Sex{
public static void main(String[] args)throws IOException{
Book[]book = new Book[10];
Scanner in = new Scanner(new FileReader("love.txt"));
String data;
int a = 0;
data = in.nextLine();
while (!(data.equals("END")))
{
//System.out.println(data);
book[a]= new Book(in.next(),in.next(),in.next(),in.next(),in.next(),in.next(),in.next());
a++;
data = in.nextLine();
}
in.close();
}
}
Dietel0004 Java How To Program c OUT Dietel & Dietel Prentice Hall 23-05-08 NULL
9Mec000980 Popular Mechanics r IN N/A N/A
MS00897666 Learn XP s IN George Gobin Microsoft
Lafore0037 Data Structures & Algorithms In Java c OUT Robert Lafore Sams 07-08-08
6Tech00472 Tech Magazine r IN N/A N/A
END
