G
gbattine
Hi guys,
i'm a new java user and i have a big question for you.
I'm developing a jsf application with eclipse and i have a problem.
I have to import a txt file with this format
string string string string
string double double double
string double double double
string double double double
etc....
The file is composed by a first row that has 4 columns of string type
and other rows of 4 columns with first column string and the others
double.
I have to define 2 object, a first headline object that is an array of
string, for storing the first row, and a second object that is composed
by a string field and by an array of double.
This code is correct?
For storing my file i need an headline array of string and an arraylist
of row objects.
How can populate them with the txt file?
I've loaded the file with
Can you help me with some code?I'm not expert....
i'm a new java user and i have a big question for you.
I'm developing a jsf application with eclipse and i have a problem.
I have to import a txt file with this format
string string string string
string double double double
string double double double
string double double double
etc....
The file is composed by a first row that has 4 columns of string type
and other rows of 4 columns with first column string and the others
double.
I have to define 2 object, a first headline object that is an array of
string, for storing the first row, and a second object that is composed
by a string field and by an array of double.
Code:
Headline string[]=new string[4];
public class row{
String geneid=null;
values double[]=null;
}
public void row(String idGene,double[3] x ) {
this.geneid=idPr;
this.values=x;
}
For storing my file i need an headline array of string and an arraylist
of row objects.
How can populate them with the txt file?
I've loaded the file with
Code:
BufferedReader br = new BufferedReader(new
InputStreamReader(myFile.getInputStream()));
Can you help me with some code?I'm not expert....