import java.io.*;
public class collect {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
File f=new File("c:\\france.txt");
RandomAccessFile mm = new RandomAccessFile(f,"rw");
Item[] qq= new Item[1000];
for (int i = 0; i < 1000; i++) {
qq[i] = new Item();
}
for (int h = 0; h < 10; h++) {
qq[h].title=mm.readLine();
qq[h].content=mm.readLine()+"\n"+mm.readLine()+"\n"+mm.readLine();
qq[h].getInfo();
}
}
class Item{
String title;
String content;
public void getInfo(){
System.out.println(title);
System.out.println(content);
}
}
刚刚学,上面搞来搞去不知道错哪了.....路过帮帮忙
holdtom
波斯汪
相关分类