Solved

What to do to NullPointerExeption?

Posted on 1997-03-27
1
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
runtime exception 2 63
Fast way to search item into Java Array (Rhino compatible) 2 46
Java Eclipse Loop 3 45
How to fix  socket closed error 11 60
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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

739 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