java 什么是方法?
方法的定义和调用
方法的重载
命令行传递参数
package com.study.measure; public class command2 { public static void main(String[] args) { command2 com =new command2(); com.test(1,2,5,89,78,99); } //可变参数 public void test(int...i){ System.out.println(i[0]); System.out.println(i[1]); System.out.println(i[2]); System.out.println(i[3]); System.out.println(i[4]); System.out.println(i[5]); } }