Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fatching data problem from html:selection

 
Amit Indore
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Here i put my code:

My problem is that i want to fetch the value from ArrayList userList with the bases of 1,2,3.
please send me whole code.
Thank you
Amit Jain
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since Lists in Java are zero based, this isn't possible. You would need to retrieve these three values with 0, 1, 2.

If each user has an ID and you're trying to retrieve a user by its ID, don't use an ArrayList at all. A Map allows you to retrieve values by their key, and that might be better suited to this task.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic