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 is the difference between int and integer in java?
What does function identity () do?
Why stringbuilder is not thread safe?
What is ide with example?
What is singleton class in java and how can we make a class singleton?
Differences between external iteration and internal iteration?
Can a static class have a constructor java?
Is break statement can be used as labels in java?
What is the difference between class & object?
What is immutable data?
What is a finally block?
What are the 8 data types in java?
What are the types of arrays in java?
how its run?
What is overriding in java?