Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to search the pertical objects in a Collections

Answers were Sorted based on User's Feedback



how to search the pertical objects in a Collections..

Answer / 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

how to search the pertical objects in a Collections..

Answer / manas

corrected of #1 ans:
ArrayList a1=new ArrayList();
a1.add("shiva");
Object e[]=a1.toArray();
for(int i=0;i<a1.size();i++)
{
if(e[i].equals("inputstring");
}
}

Is This Answer Correct ?    2 Yes 0 No

how to search the pertical objects in a Collections..

Answer / siva thimmannagari

ArrayList a1=new ArrayList();
a1.add("shiva");
Object e[]=a1.toArray();
for(int i=0;i<a1.size();i++0
{
if(e[0].equals("inputstring");
}
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Advanced Java Interview Questions

What value does readline() return when it has reached the end of a file?

0 Answers  


What is the difference between a static and a non-static inner class?

0 Answers  


What invokes a thread?s run() method?

2 Answers  


What must a class do to implement an interface?

0 Answers  


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

0 Answers  


Connection Pooling with different type of databases?

1 Answers  


Which Taglibraury you used in your project? plz send me ans....which we r using generally

2 Answers  


What is the relationship between an event-listener interface and an event-adapter class?

0 Answers  


what is diff between Access modifier and specifier?

5 Answers   L&T,


Why threads will block on I/O?

2 Answers  


What method is invoked to cause an object to begin executing as a separate thread?

0 Answers  


Explain about thread synchronization inside a monitor?

0 Answers   Saksoft,


Categories