| Author |
how to check whether a value is there in the ArrayList or not ?
|
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
|
|
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
|
The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
|
 |
Roberto Perillo
Bartender
Joined: Dec 28, 2007
Posts: 2212
|
|
|
How about ArrayList#contains(Object)?
|
Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
|
 |
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
|
|
thanks mate
|
 |
 |
|
|
subject: how to check whether a value is there in the ArrayList or not ?
|
|
|