Why do I get a Null Pointer Exception?
Posted
by Roman
on Stack Overflow
See other posts from Stack Overflow
or by Roman
Published on 2010-04-21T13:04:48Z
Indexed on
2010/04/21
13:13 UTC
Read the original article
Hit count: 127
I have this code:
Manager manager = new Manager("Name");
MyWindowListener windowListener = new MyWindowListener();
manager.addWindowListener(windowListener);
Eclipse writes that I have a NullPointerException in the last line. What can be the reason for that. I do have constructors in the Manager and MyWindowListener.
If it's important MyWindowListener implements WindowListener
.
© Stack Overflow or respective owner