【发布时间】:2014-10-23 14:50:44
【问题描述】:
我将如何修复此错误?
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method methodName(className[], String, int) in the type Program is not applicable for the arguments ()
at Program.main(Program.java:43)
我的代码的一个 sn-p,调用方法:
public class Program {
public static void main(String[] args) throws FileNotFoundException {
methodName();
}
}
方法名代码:
public static void methodName(className[] array, String stringName, int counter){
//Code here
}
【问题讨论】:
-
你没有传递给你的方法methodName()的参数
-
我必须传递className[]、stringName和counter吗?
-
如果以下任一答案对您有所帮助,请考虑接受。这会给您和回答者带来少量声誉,并向其他人表明您已经找到了解决方案。
标签: java methods compilation arguments