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
Aucun commentaire:
Enregistrer un commentaire