There are a couple of issues with this code:

  1. There cannot be two public classes in the same file. In this case, the 'Manager' class is public, but the 'Student' class is not. Either make the 'Student' class public or move it to a separate file.
  2. The 'Student' class is missing a closing brace on line 5.

Here's the corrected code:

public class Manager {
    int age;
}

public class Student {
    private String name;
}
Java Error: Multiple Public Classes & Missing Brace in Student Class

原文地址: https://www.cveoy.top/t/topic/ozWu 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录