• Post Reply Bookmark Topic Watch Topic
  • New Topic

need help to read the contents from a text file and store in a list  RSS feed

 
Shree Chinnu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a problem in my code

I have to read a text file of this format

int num_thread => Total number of threads in the file

for (i = 0; i < num_thread; i++)
{
int num_message_i => Total number of messages of the next thread i
int => Total number of reference to the next thread i
for (j = 0; j < num_message_i; j++)
{
String => Author of the message
Double => Age (Posting Time) of the message
String => Title of the message
String => Contents of the message
}
}


The code I have written is as follows


But when I am trying to retrieve the data from the threadList


Only the Last message data is printed threadList.size() times.

Kindly let me know what might be the reason for this
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
edit your post to use code tag . use *code tag* while you are posting code
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!