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 does g mean in regex?
Why spring singleton is not thread safe?
Is boolean a wrapper class in java?
Is null or empty java?
How to restrict a member of a class from inheriting by its sub classes?
What is variable and rules of variable?
Why does java not support operator overloading?
Explain heap sort?
What is numeric function?
Why we override equals() method?
What is ternary operator? Give an example.
What is a ternary operator in java?
Can we use catch statement for checked exceptions?
When do you call copy constructor?
What is the meaning of variables in research?