Results 1 to 2 of 2
  1. #1
    JordashTalon is offline Member
    Join Date
    Jan 2009
    Rep Power

    Default what does <Elements> mean

    Looking at this:

    private Collection<Element> elements = new ArrayList<Element>();

    What does that do?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    This is how Java implements generics, a new feature in Java 5, I think, and it allows for increased compile-time type safety. For details, please have a look here:
    Lesson: Generics (The Java™ Tutorials > Bonus)

Similar Threads

  1. Negative elements
    By in forum New To Java
    Replies: 6
    Last Post: 12-15-2008, 04:48 AM
  2. Missing Elements
    By princess in forum NetBeans
    Replies: 1
    Last Post: 10-29-2008, 11:51 PM
  3. deleting elements
    By nalinda in forum New To Java
    Replies: 2
    Last Post: 12-06-2007, 01:42 AM
  4. Help with array of elements
    By zoe in forum New To Java
    Replies: 1
    Last Post: 07-24-2007, 05:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts