アットウィキロゴ

ghjklopiu

import java.io.*;

class pro
{

public static void main(String[] args)
{

int t;
  String[] test = new String[1000];


  try{
     BufferedReader br = new BufferedReader(new FileReader("ebook2.txt"));
  
     String str;
String x[]=new String[10];
t=1;
     for(int i=0;i<200; i++){
        str = br.readLine();
    x=str.split("ppp");      
if(str.indexOf('@')==-1)test[t]=x[0];
if(str.indexOf('@')==-1)t=t+1;

}


     br.close();
  }
  catch(IOException e){
     System.out.println("入出力エラーです。");
  }


try{
PrintWriter pw = new PrintWriter
(new BufferedWriter(new FileWriter("data.txt")));

for (t=1;t<100;t++){  
pw.print(t);
pw.print(",");  
pw.println(test[t]);      
}
System.out.println("ファイルに書きこみました。");

pw.close();
}
catch(IOException epe){
System.out.println("入出力エラーです。");
}







}
}
最終更新:2010年12月08日 21:48