package book;
import java.io.*;
public class pro {
String[] data=new String[60000];
int s,datanumber;
double[][] p=new double[600][21];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
readx("b.csv");
int sx;
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
for(sx=0;sx<x.length;sx++){
double n1=num_double(x[0]);
p[s-1][sx+1]=n1;
}
}
datanumber=datanumber-1;
for(s=1;s<datanumber+1;s++){
System.out.println(p[s][1]);
}
}
double num_double(String str){
double nx;
nx=0;
try{
nx=Double.parseDouble(str);
}catch (Exception e) {}
return nx;
}
void readx(String file){
String str;
BufferedReader br;
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));
while((str = br.readLine()) != null) {
s=s+1;
data[s]=str;
}
br.close();
} catch (IOException e) {System.out.println(e);}
datanumber=s;
}
}
最終更新:2017年02月01日 20:23