1 Star 0 Fork 0

CS-IMIS-23/20172305TX

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
VariableParameters.java 995 Bytes
一键复制 编辑 原始数据 按行查看 历史
三金 提交于 7年前 . 完成第8章的例子代码
//*************************************************************************************
// VariableParameters.java Author: Lewis/Loftus
//
// Demonstrates the use of a variable length parameter list.
//*************************************************************************************
public class VariableParameters
{
//------------------------------------------------------------------------------------------------
// Creates two Family objects using a constuctor that accepts a variable number of String objects
// as parameters.
//------------------------------------------------------------------------------------------------
public static void main(String[] args)
{
Family lewis = new Family("John", "Sharon", "Justin", "Kayla", "Nathan", "Samantha");
Family camden = new Family("Stephen", "Annie", "Matt", "Mary", "Simon", "Lucy", "Ruthie", "Sam", "David");
System.out.println(lewis);
System.out.println();
System.out.println(camden);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/CS-IMIS-23/20172305TX.git
git@gitee.com:CS-IMIS-23/20172305TX.git
CS-IMIS-23
20172305TX
20172305TX
master

搜索帮助