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
Are arrays passed by reference in java?
What is class array in java?
What does exp mean in math?
Explain about wait() method?
Which are different kinds of source code?
what is ststic with example
What is the constructor?
How can constructor chaining be done by using the super keyword?
What is the role of the java.rmi.naming class?
What are different types of arrays?
Is oracle charging for java?
What is a website container?
What is the map interface in java programming?
What is default switch case? Give example.
Can we have any code between try and catch blocks?