我试图让 Team Roster 和 Coach 类显示输出,但是,当我运行程序时它不会产生输出。它只产生一流的,但在那之后,没有输出显示。
public class Team {
public static void main(String[] args) {
String team_name = "Team Georgia";
System.out.println(team_name);
}
//Team Roster
public class Player {
public void main(String[] args) {
String[] first_name = {"Jack","Dave","Henry","John","David","Bob","Tony","Malcolm","Hiro","Jack","Jesus","Luck","Ben", "Benny", "Caboose", "Michael","Taylor","Mark","Hiroshida","Jack","Patric","Davin"};
String[] last_name = {"Le","lynth","Luther","Kendral","Larry","John","Dave","Grendal","Lee","Lyn","Susan","Solo","Holmes","Stark","Potter","Welma","Han","Smith","Solo","Weasly","Emma","Bones"};
String[] position = {"Front","Front","Front","Front","Side","Side","Side","Back","Back","Side","Front","Front","Front","Front","Side","Side","Side","Back","Back","Side","Mid","Mid"};
for ( int i = 0; i < first_name.length; i++ ) {
//System.out.print("First name: " + first_name[i]+ "\t\t" + " Last name: " + last_name[i] + "\t\t\t" + " Position: " + position[i] + "\n" );
System.out.println("First name: " + first_name[i]);
System.out.println("Last name: " + last_name[i]);
System.out.println("Position: " + position[i]);
}
}
}
//Coach
public class Coach {
public void main(String[] args) {
String[] first_name = {"Brown","Dave","Jack","King"};
String[] last_name = {"Jun","Jac","Frost","Kong"};
String[] title = {"Head Coach", "Assistant Coach", "Offensive Coordinator", "Defensive Coordinator"};
for ( int i = 0; i < first_name.length; i++ ) {
//System.out.print("First name: " + first_name[i]+ "\t\t" + " Last name: " + last_name[i] + "\t\t\t" + " Position: " + title[i] + "\n" );
System.out.println("First name: " + first_name[i]+ " Last name: " + last_name[i] + " Position: " + title[i]);
}
}
}
}