populate data from object to lists in java.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uhdam
    New Member
    • Mar 2009
    • 50

    populate data from object to lists in java.

    Hi...

    can somebody tell me how to populate data from object to lists in java.

    when can problems like null pointer exception arise when populating objects to lists ?

    Help needed as soon as possible...

    Thanks in Advance....
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by uhdam
    Hi...

    can somebody tell me how to populate data from object to lists in java.

    when can problems like null pointer exception arise when populating objects to lists ?

    Help needed as soon as possible...

    Thanks in Advance....
    There are many causes for an NPE (NullPointerExc eption) but all come from a dereference (using the dot operator) on a reference that is null. An NPE is easy to catch; there is an entire article devoted to it in our 'Insights' section.

    kind regards,

    Jos

    Comment

    • uhdam
      New Member
      • Mar 2009
      • 50

      #3
      Thank you...

      But how to populate data from object to lists in java. Any suggestions...

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by uhdam
        Thank you...

        But how to populate data from object to lists in java. Any suggestions...
        Read the API documentation for the Collection interface and the List interface; all you do is add(...) them to your List.

        kind regards,

        Jos

        Comment

        • uhdam
          New Member
          • Mar 2009
          • 50

          #5
          I think this should be helpful... will try .. Thank you

          Comment

          Working...