Program won't compile: “illegal start of type”

后端 未结 1 1635
轻奢々
轻奢々 2021-01-29 13:02

I wrote this program and I keep getting:

\" Grades.java:10: error: illegal start of type\"

import java.util.Scanner;
public          


        
相关标签:
1条回答
  • 2021-01-29 13:33

    You need a starting method that contains everything from your for loop downwards.

    Usually:

    public static void main (String [] args) {
    
    }
    
    0 讨论(0)
提交回复
热议问题