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

后端 未结 1 1636
轻奢々
轻奢々 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)
提交回复
热议问题