how to search the pertical objects in a Collections

Answer Posted / raj

We can search by contains(Object) method of collection
class. like
Arraylist list = new ArrayList();
list.add("a");
list.add("b");
if(list.contains("a")
{
--
--
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should synchronization primitives be used on bean methods?

551


What are the services in RMI ?

1884


Is infobus easy to use?

598


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1630


What event results from the clicking of a button?

695






Why doesn’t the focus feature on the tag work in every circumstance?

563


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

546


Difference between loadclass and class.forname?

596


What are externizable interface?

582


Explain the different types of memory used by jvm?

612


What are the different approaches to represent an inheritance hierarchy?

584


How to determine SGA site?

1908


What modifiers may be used with an inner class that is a member of an outer class?

574


whats is statement and procedure

1585


What is synchronization and why is it important?

543