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

how to check whether a value is there in the ArrayList or not ?  RSS feed

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suppose i have a data structure ArrayList that has 10 values say 1 2 3 and so on ...
and i have a textfield where user is entering a value something between 1 to 10 now i need to check whether the value entered by the user is there in the ArrayList or not
how to do this ? please explain
 
Roberto Perillo
Bartender
Posts: 2273
3
Eclipse IDE Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about ArrayList#contains(Object)?
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roberto Perillo wrote:How about ArrayList#contains(Object)?

thanks mate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!