I am not able to set a Boolean value to a field using Java reflection.
The field data type is java.lang.Boolean. however, I am able to set the value if the data type is primitive type i.e boolean.
Here is a simple VO with Boolean type and primitive type:
public class TestVO {
private Boolean bigBoolean;
private boolean smallBoolean;
}
Run Code Online (Sandbox Code Playgroud)
Here is my java reflection code:
public class TestClass {
public static void main(String args[])
throws IllegalArgumentException, IllegalAccessException, …Run Code Online (Sandbox Code Playgroud)