Hi all,
Could all help me.... I developed my program and I used ArrayList,
follow as:
===========
private int[] parseValue(String line, int lineNum) {
int[] v = new int [3];
v[0] = 1;
v[1] = 2;
v[2] = 3;
return v;
}
.........
........
private boolean ShowData(String fileName)
{
int xx[] = null;
ArrayList load = new ArrayList();
while ( reader.ready() ) {
xx = parseValue(reader.readLine(), line);
load.add(xx);
}
System.out.println(?????????);
}
=====================
How I can show data value of "load" ??????
Jeff - 17 Feb 2007 06:20 GMT
> Hi all,
> Could all help me.... I developed my program and I used ArrayList,
[quoted text clipped - 25 lines]
> =====================
> How I can show data value of "load" ??????
What in the world are you trying to do? You have a function ParseValue
that has two arguments, neither of which is used but rather returns an
array. You then have an ArrayList where each element is that very
same array. If this is homework, you need a session with a TA. If not,
please clarify the purpose of the program.
Richter~9.6 - 17 Feb 2007 10:04 GMT
> Hi all,
> Could all help me.... I developed my program and I used ArrayList,
[quoted text clipped - 25 lines]
> =====================
> How I can show data value of "load" ??????
I would also love to know what you are trying to do but anyway... to
get the contents of the load ArrayList, you would probably do
something similar to the below: -
for(int[] v : load) {
System.out.println(v[0] + ":" + v[1] + ":" + v[2] +"\n");
}
Regards,
Richard
murari garg - 17 Feb 2007 13:51 GMT
> Hi all,
> Could all help me.... I developed my program and I used ArrayList,
[quoted text clipped - 25 lines]
> =====================
> How I can show data value of "load" ??????
are you trying to access your array list from some specific file.