wood burning stoves 2.0*
The moose likes Java in General and the fly likes getting object but looking value in .data file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "getting object but looking value in .data file" Watch "getting object but looking value in .data file" New topic
Author

getting object but looking value in .data file

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 418
Hi

I am reading from a file and setting the data in a List like this



When I retrieve the data I get the object definition instead of the value in the file. How could I get the value in the file?

Thanks
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Split returns an array. You will have to either choose which index in the array to add to your list, or iterate over the list to add them all, or convert the array to a List and use List.addAll(), like:


Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting object but looking value in .data file