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 2 of 2

Thread: Null Pointer Exception

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Null Pointer Exception

    Null Pointer Exception fixed.
    Last edited by kendraheartt; August 16th, 2012 at 10:38 AM.


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Null Pointer Exception

    All that stuff you are doing with and without doing other stuff does not matter at all for your problem. Your problem boils down to you are using a variable you did not initialize yet. The error message tells you the name of the variable and the line number where it is being used without being initialized. Figure out what variable has not been initialized. Look at your program and decide what the value should be at the time it is being called. Look back at your program to where that value was supposed to have been assigned. If you think it is good, try a toString on it and see what it is.

Similar Threads

  1. Help With Null Pointer Exception
    By kendraheartt in forum What's Wrong With My Code?
    Replies: 17
    Last Post: August 15th, 2012, 10:41 PM
  2. null pointer exception
    By Ramzi89 in forum Object Oriented Programming
    Replies: 1
    Last Post: August 15th, 2012, 01:57 PM
  3. Help with null pointer exception
    By Dr.HughMan in forum Exceptions
    Replies: 35
    Last Post: November 30th, 2011, 09:00 PM
  4. Null Pointer Exception?
    By SeanEE89 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: November 16th, 2011, 06:21 PM
  5. Null Pointer Exception Help !!
    By AlterEgo1234 in forum Member Introductions
    Replies: 1
    Last Post: March 27th, 2011, 10:07 AM