我有我的方法
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();
}
大话西游666
蝴蝶不菲
随时随地看视频慕课网APP
相关分类