Why do I get a Null Pointer Exception?
- by Roman
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.