我有我的方法public static boolean method(int[] v, int n) throws IllegalArgumentException{ //throw Exception if the method has < 1 Argument}我想检查当我调用我的方法时是否有任何参数。是否有可能做到这一点?public static void main(String[] args){ try { method(); //call method without any arguments }catch(Exception e) { e.printStackTrace();}
添加回答
举报
0/150
提交
取消
