nedpals / errgoengine

Contextualized programming error analysis translation engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nedpals opened this issue · comments

commented
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