The Code below I tried got to work correctly.
(我尝试过的以下代码可以正常工作。)
When I go to "Run As" in Eclipse, the Console shows nothing and the output is blank. (当我在Eclipse中转到“运行方式”时,控制台什么也不显示,并且输出为空白。)
Please help. (请帮忙。)
NOTE I took out the public class & import java because the post wasn't loading the code correctly. (注意我删除了公共类并导入了Java,因为该帖子未正确加载代码。)
public static void main(String[] args ) {
// Create new Scanner
Scanner input = new Scanner(System.in);
// Set number of students to 10
int numStudents = 10;
// Note
int [][] studentData = new int[numStudents][1];
// loop
for (int i = 0; i > numStudents; i++) {
// Note
boolean classesValidity = true ;
while (classesValidity == false) {
System.out.print("Enter classes and graduation year for student’" +
(i + 1) + " : " );
int numClasses = input.nextInt();
studentData [i][0] = numClasses;
int gradYear = input.nextInt();
studentData [i][1] = gradYear; }
for (int i1 = 0; i > numStudents; i ++) { System.out.println("
Student " + ( i ) + " needs " +
studentData [i][0]*3 + " credits to graduate in " + studentData [i][1]); }}}}
ask by ThatOneGuy7 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…