1. main方法必须声明为public
2. main方法必须声明为静态static
3. main方法必须声明为void
4. main方法名不能修改
5. main方法数组参数的赋值
运行结果:
main方法为什么不会运行main里面的for循环呢?
因为没有对数组进行赋值:
右键点击Run as → 选择 Run Configurations
选择(x)=Arguments
输入参数:
点击Run:
运行成功
1. main方法必须声明为public
2. main方法必须声明为静态static
3. main方法必须声明为void
4. main方法名不能修改
5. main方法数组参数的赋值
运行结果:
main方法为什么不会运行main里面的for循环呢?
因为没有对数组进行赋值:
右键点击Run as → 选择 Run Configurations
选择(x)=Arguments
输入参数:
点击Run:
运行成功