Solved

What to do to NullPointerExeption?

Posted on 1997-03-27
1
176 Views
Last Modified: 2010-04-16
My Java-code gives "java.lang.NullPointerExeption".
Please tell what usually makes it, and why it comes
also when I have "commented" almost everything out (only Thread and while-loop left).
0
Comment
Question by:sanct
1 Comment
 
LVL 3

Accepted Solution

by:
pc012197 earned 10 total points
ID: 1219276
A NullPointerException is generated when you try to access a method or variable in the 'null' object. Usually it is caused by accessing reference variables without assigned them to an object first.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java Options in Zimbra Server 2 54
map related example 6 49
jdbc error in jsp application 20 46
Desingning Refactoring existing code 2 24
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question