Method <X> in Class <Y> Cannot Be Applied to Given Types


This Java software error message is one of the more helpful error messages. It explains how the method signature is calling the wrong parameters.
RandomNumbers.java:9: error: method generateNumbers in class RandomNumbers cannot be applied to given types;
generateNumbers();
required: int[]
found:generateNumbers();
reason: actual and formal argument lists differ in length

The method called is expecting certain arguments defined in the method’s declaration. Check the method declaration and call carefully to make sure they are compatible.