-5
for(int x = 0; x < rp.studentRecords.length; x++){
System.out.println("Student name: " +rp.studentRecords[x].getName());
System.out.println("Major: "+ rp.studentRecords[x].getClass().getName());
System.out.println("Age: "+ rp.studentRecords[x].getName());
System.out.println("Year " +rp.studentRecords[x].getYear());
System.out.println("Credits Earned: "+ rp.studentRecords[x].getCredits());
System.out.println("Remaining Credits: "+ rp.studentRecords[x].getRemainingCredits());
System.out.println("-------");
}
,我需要那些的System.out.println()秒凝結成一個單一的一個。
...........和? –
你可以用'「\ n」'輸出一個新行。也許看看'String.format'。 – Thilo
另外:...........爲什麼? – Thilo