what is difference between colection and collections?

Answer Posted / devraj

Collection is an root interface for collection framework and
implemented by collection classes like List,Set ...etc
Whereas Collections is class which contains static methods
to operate on collection classess
EX:
List l=New ArrayList();
l.add("dev");
l.add("raj");
l.add("dev");
l.add("raj");
l.add("dev");
l.add("raj");
now i want to know no of dev in List
like fallowing
System.out.println(Collections.frequency(l,"dev"));

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are arrays passed by reference in java?

492


What is class array in java?

517


What does exp mean in math?

540


Explain about wait() method?

571


Which are different kinds of source code?

664






what is ststic with example

1599


What is the constructor?

586


How can constructor chaining be done by using the super keyword?

622


What is the role of the java.rmi.naming class?

532


What are different types of arrays?

539


Is oracle charging for java?

550


What is a website container?

509


What is the map interface in java programming?

592


What is default switch case? Give example.

578


Can we have any code between try and catch blocks?

565