我正在尝试将public static boolean key[] = new boolean[68836];发送到另一个类中的方法。但是,请继续获取以下错误:
error: method tick in class Game cannot be applied to given types;
game.tick(key);
required: Boolean[]
found: boolean[]
reason: actual argument boolean[] cannot be converted to Boolean[] by method
invocation conversion啊,我看到了我做错了什么!但现在我也学到了一些我以前不知道的东西。这都要感谢埃兰。。
发布于 2014-08-20 18:50:34
布尔数组不能转换为布尔数组。布尔是原语,布尔是对象的子类.
您应该将一个Boolean[]传递给您的方法,因为这正是它所期望的。
https://stackoverflow.com/questions/25412225
复制相似问题