boolean.isInstance(true) is false?

Viewed 261

Problem

The Class Object of a boolean Field does not recognize other booleans as instances.

Code

public class Test {
    public boolean b;
    public static void main(String[] args) {
        System.out.println(Test.class.getFields()[0].getType().isInstance(true));
    }
}

Result

false
2 Answers
Related