Skip to content
Advertisement

Tag: parameters

The method countTrue(boolean[]) in the type GUI is not applicable for the arguments (boolean, boolean, boolean, boolean, boolean)

this is the error : “The method countTrue(boolean[]) in the type GUI is not applicable for the arguments (boolean, boolean, boolean, boolean, boolean)” , the error is in the last line , but i dont get why. Answer New array should be declared as below: int x = GUI.countTrue(new boolean[]{true, false, false, true, false}); OR you can use varargs and

Advertisement