I think the sunject’s pretty self-explanatory. I use JDK 1.6.0 update 26, and created a new project with just one line to confirm this:
Boolean.class.newInstance();
and it throws the following:
Exception in thread "main" java.lang.InstantiationException: java.lang.Boolean
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
Does it suppose to fail? If so, why?
Given a class you can find out what it needs to be constructed: