Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: LinkedList with user defined types

  1. #1
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: LinkedList with user defined types

    Exception in thread "main" java.lang.NullPointerException
    at inputintercase1.DataBase.toString(DataBase.java:42 ) (this is the line where iterator is created and initialized)
    at inputintercase1.InputIntercase1.main(InputIntercas e1.java:135)
    Look at line 42, find the variable with the null value and then backtrack to find out why that variable doesn't have a valid value.

    Please edit your post and wrap your code with
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.


  2. #2
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: LinkedList with user defined types

    Dear Norm
    Thanks for your reply, i found the bug, it was in the initialization of database object and object declaration.

    Thank you so much for your time

Similar Threads

  1. User Defined Criteria
    By SimonTemplar in forum Java Theory & Questions
    Replies: 0
    Last Post: February 20th, 2013, 07:02 PM
  2. Need help with passing user defined variable in SQLJ
    By redkryptonite in forum JDBC & Databases
    Replies: 1
    Last Post: March 7th, 2012, 05:47 AM
  3. [SOLVED] Printing an ArrayList of user-defined Objects
    By er1111 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 2nd, 2012, 11:06 AM
  4. User-Defined Methods
    By ZippyShannon in forum What's Wrong With My Code?
    Replies: 4
    Last Post: July 28th, 2011, 10:23 PM
  5. User Defined Methods
    By mgutierrez19 in forum Object Oriented Programming
    Replies: 11
    Last Post: October 20th, 2009, 06:57 PM

Tags for this Thread