ExceptionInInitializerError: NullPointerException

R

Roedy Green

It doesn't depend on allocating objects of B. But, if the
initialization of B's static field depends on executing from "main"
method (normally, it's the case), you got the same effect.

That's just a bug if you ever instantiate the class by any means other
than calling main.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top