Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2013
    Posts
    108
    Rep Power
    0

    Default List data structure

    A List is a java collection that stores elements in sequence and allow duplicate elements. The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index, and search for elements in the list. More formally, lists typically allow pairs of elements e1 and e2 such that e1.equals(e2), and they typically allow multiple null elements if they allow null elements at all.

    What is meant by the bold portioned content(allow multiple null elements if they allow null elements at all) of the above statement which can be found at
    Hibernate List Mappings?

    Does a list allow null elements or not?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,776
    Blog Entries
    7
    Rep Power
    21

    Default Re: List data structure

    A List is an interface and has no control over null elements to be a member or not; you have to read the API for the classes that implement this interface. (spoiler: they do allow null elements)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Join Date
    Aug 2013
    Posts
    108
    Rep Power
    0

    Default Re: List data structure

    Now, List is an interface or data structure?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,776
    Blog Entries
    7
    Rep Power
    21

    Default Re: List data structure

    Did you actually read my previous reply?

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,357
    Rep Power
    6

    Default Re: List data structure

    Quote Originally Posted by suhaas.mohandos@gmail.com View Post
    Now, List is an interface or data structure?
    Well you can ignore Jos all you want, but you can't ignore documentation.

    Google: java 7 List
    result: List (Java Platform SE 7 )

    What do the API docs say? So easy to find answers.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 11
    Last Post: 09-21-2012, 10:33 AM
  2. Replies: 8
    Last Post: 10-17-2011, 10:17 AM
  3. Searchable List Structure?
    By ShadowCopy in forum New To Java
    Replies: 4
    Last Post: 08-30-2009, 01:09 AM
  4. data structure and data base??
    By ahmed13 in forum Advanced Java
    Replies: 8
    Last Post: 03-27-2009, 06:48 AM
  5. Doubly-linked list with data structure
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-16-2008, 11:30 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
  •