public class fun2 {
public static void main(String[] args) {
fun2 p1=new fun2();
String[] ss= new String[] {"张三","20"};
p1.printInfo(ss);
String[] ss1= new String[] {"张三","20","南宁","13453232345","学生"};
p1.printInfo(ss1);
p1.printInfo1("李四","23","北京","秘书");
}
public void printInfo(String[] args) {
for(int i=0;i<args.length;i++)
{
System.out.println(args[i]);
}
}
public void printInfo1(String...args) {
for(int i=0;i<args.length;i++)
{
System.out.println(args[i]);
}
}
}
转载请注明原文地址:https://blackberry.8miu.com/read-3270.html