File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collections" Watch "Collections" New topic
Author

Collections

Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 112
Hi Everybody

What does the letter E in Interface Collection<E>mean..And also what does the letter T in Comparator<T> mean.Like wise what do K,V mean in Map<K,V>.Do they have any special meaning or reference.

Thanks in advance
with regards
Deepthi
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Do you understand about generics, and are just asking if the letters themselves mean anything, or do you not know what the whole angle-bracket notation is about in the first place?

If it's the former, I'd guess that E is for element, K and V are for key and [/i]value, and T is for type. But they're arbitrary -- could be any letter.

If you don't know what the angle brackets mean, they are part of something new in Java 5 called generics. http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html is one place you might start to learn about this.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Collections
 
Similar Threads
Generics question from Exam Lab
need help about generics
single return statement: yes / no?
how comparator works