how to search the pertical objects in a Collections

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the session.get() method and the session.load() method?

604


Difference between new operator and class.forname().newinstance()?

602


Why is string immutable in java?

584


How to deploy Jar, War files in J2EE?

2175


Why use a datasource when you can directly specify a connection details?

534






Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

590


Why do I get a duplicate name error when loading a jar file?

548


When a thread blocks on i/o, what state does it enter?

578


what is the use of State Factories?

1911


Do I have to use jsps with my application?

585


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

2158


What is permgen or permanent generation?

587


How task's priority is used in scheduling?

1786


How are the elements of a cardlayout organized?

596


What classes of exceptions may be caught by a catch clause?

560