Compiler Error J0158

Class 'identifier' already defined

The compiler detected two or more classes defined with the same name. Ensure that you do not have the class defined more than once (as an outer class) in the same source file or package. This error can also occur if a class is duplicated by an imported class. Rename one of the classes or remove the duplicate instance and compile again.

The following example illustrates this error:

public class Simple {
   // do something meaningful
}

class Simple {
   // error: class 'Simple' already defined
}