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
What do you understand by the term singleton?
What's the purpose of static methods and static variables?
Why do people says “java is robust”?
What is a flag variable?
What is the method overriding?
What is the difference between checked exception and unchecked exception?
How do you invoke a method?
What is functional interface in java?
What are the types of relation?
What is e java?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
what is heap memory?
Why hashset is used in java?
Is cout buffered?
What is Classloader in Java?