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
How many types of classes are there in java?
What are java threads?
What is meant by call by reference?
how to create multithreaded program? Explain different ways of using thread? : Java thread
Can the interface be final?
What is a boolean expression in java?
What is thread life cycle?
What is method overloading and method overriding?
How is hashcode calculated in java?
What is the use of isempty in java?
What does jenkins do?
How can we make sure main() is the last thread to finish in java program?
What methodology can be utilized to link to a database?
What do you mean by inner class in java?
How do you compare two objects?