aspose file tools
The moose likes Java in General and the fly likes how to check whether a value is there in the ArrayList or not ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "how to check whether a value is there in the ArrayList or not ?" Watch "how to check whether a value is there in the ArrayList or not ?" New topic
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

Roberto Perillo wrote:How about ArrayList#contains(Object)?

thanks mate
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to check whether a value is there in the ArrayList or not ?
 
Similar Threads
actionlistener and restricting size of button
arraylist
using logic:eual or logic present
how to retrive session object / struts
valueChangeListener not called.