Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting object but looking value in .data file

 
Isaac Ferguson
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic