【发布时间】:2014-11-16 22:01:00
【问题描述】:
在我的程序中,我希望用户能够打印数组中的元素。这是我已经走了多远,我想不出下一步该放什么?
public void viewClub() {
System.out.println("Please enter the name of the country whose details you would like to see");
String Name = input.next();
for (int i = 0; i < countryList.size(); i++) {
Country x = countryList.get(i);
if (Name.equalsIgnoreCase(x.getName())) {
}
【问题讨论】:
-
您编写了所有代码,但您不知道如何打印字符串?
-
您没有在代码中的任何地方使用数组。请注意,
ArrayList不是数组。 -
public void viewClub() { System.out.println("请输入您想查看统计数据的球队名称");字符串名称 = input.next(); for (int i = 0; i
标签: java arrays loops int element