This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Fatching data problem from html:selection  RSS feed

 
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!