Solved

What to do to NullPointerExeption?

Posted on 1997-03-27
1
174 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now