Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR TEMPLATE] Java - class <class name> is public, should be declared in a file named <class name>.java #11

Closed
4 tasks done
nedpals opened this issue Nov 3, 2023 · 0 comments

Comments

@nedpals
Copy link
Owner

nedpals commented Nov 3, 2023

Name Type Code Language
class is public, should be declared in a file named .java Compile-time Error java.lang.PublicClassFilenameMismatchError Java

Description

The public class needs to be in a file with the same name in Java.

Sample Code

public class Right {
	public static void main(String[] args) {

	}
}

Sample Error Message

Wrong.java:1: error: class Right is public, should be declared in a file named Right.java
    public class Right {
            ^
    1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant