Reply to comment

JDK1.5 Generics

Good intro to using the Generics system in JDK1.5+ at JavaPro today.
Short summation: Great feature, FUGLY syntax.
The whole thing really boils down to letting the compiler create Class specific versions of more generic classes without your having to code a wrapper that type checks. IE:

List<? extends Number> ref = new LinkedList<Integer>();

gives you a LinkedList that will only accept Integer class types.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <hr> <li> <dl> <dt> <dd> <pre> <b> <h1> <h2> <h3> <blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.