i have a text file with n number of lines. I want to read that file and write into an array. How can i do that? I don't know the size of the file, how can i get the size? can i use VECTOR? If any body has source code or somebody can write code,please pass it on to me.
text file as follows
wille,programmer
dan,team lead
mike,analyst,programmer
My code is
String thisLine1;
FileInputStream fin1 = new FileInputStream("first.txt");
DataInputStream myInput1 = new DataInputStream(fin1);
while ((thisLine1 = myInput1.readLine()) != null) {
where do i go from here?
Thanks in advance.