-1

I am familiar with using parentheses, as in myMethod(myParameter), in Java and other programming languages, but what do the lesser than < and greater than > signs mean when they are used together in a array name? Is there a special name for them?

Sorry if this is a duplicate, but I don't know how to search for this.

Clarification: I wasn't referring to the role of any specific type inside the symbols, but rather the usage of the <> symbols themselves.

Suragch
  • 935
  • 3
  • 9
  • 15
  • http://stackoverflow.com/questions/3017253/what-is-the-role-of-the-data-types-inside-of-in-java?lq=1 – blueygh2 May 15 '14 at 05:38
  • They mean you need to learn more of the Java language :-) – paxdiablo May 15 '14 at 05:42
  • Thanks. Java Generics is what I wanted. I just didn't know what it was called. Too bad it cost me down votes to get the answer, though. :( – Suragch May 15 '14 at 05:44
  • You got two donvotes for a rep of -4. Here's an upvote for +10. Quit your whining :-) (note the smiley!). – paxdiablo May 15 '14 at 05:46
  • @paxdiablo, you're right. I was going to edit out the whining from my comment, but I think I passed some editing time limit. Anyway, thanks. – Suragch May 15 '14 at 05:57
  • 1
    It's a fair enough question. If you don't know what it's called, you don't know what to search for, either in Google (or some other search engine), or on Stack Overflow. Googling `<` doesn't help much, since there are so many other uses for this symbol. I think the people who downvoted this question didn't really think things through. – Dawood ibn Kareem May 15 '14 at 06:08

1 Answers1

2

it is java generics, for type safe, and always.using with collections.

i suggest you read the SCJP book, it has a chapter called Generics and Collections, it provides all details you will need, it really helpful. hope it helps.

Haifeng Zhang
  • 30,077
  • 19
  • 81
  • 125
  • 2
    To the downvoter: it would be polite to state _why_ you think this answer isn't useful. That would make it easier for author to fix whatever problem exists, or state why you're incorrect (assuming that's the case). – paxdiablo May 15 '14 at 05:44
  • @paxdiablo - maybe because of this - "and always.using with collections" – TheLostMind May 15 '14 at 05:48
  • i wanted to say generics is always bundle with collections, for example, Queue, List, Map and so on – Haifeng Zhang May 15 '14 at 05:54
  • Thanks for a reference to the SCJP book. Here is a link for anyone else who might find it useful. https://java.net/downloads/jfjug/SCJP%20Sun%20Certified%20Programmer%20for%20Java%206-0071591060.pdf – Suragch May 15 '14 at 06:07
  • By reading the SCJP book I learned that <> are called angle brackets. – Suragch May 15 '14 at 06:38