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 How to use different Java types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to use different Java types" Watch "How to use different Java types" New topic
Author

How to use different Java types

Dustin Schreader
Ranch Hand

Joined: May 25, 2009
Posts: 102
I'm looking at some code that I may use in my program to look up a customers ID number and I want to do a search to check if the number is in the file before it tries to return the ID and customers info. I know <T> but I didn't know it could be used for other things like <Video> Can someone explain what is going on in this set of code? I mainly want to know how one would <random thing> make that work and what it does.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14811
    
  26

Those things between angle brackets are called generics.

Have a look at this tutorial: Lesson: Generics


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to use different Java types