J0181 | J0182 | J0183 |
J0184 | J0185 | J0186 |
J0187 | J0188 | J0189 |
J0190 | J0191 | J0192 |
J0193 | J0194 | J0195 |
J0196 | J0197 | J0198 |
J0199 | J0200 |
This error message is currently not used.
This error message is currently not used.
This error message is currently not used.
This error message is currently not used.
This error message is currently not used.
This error message is currently not used.
This error message is currently not used.
This error message is currently not used.
A return statement was found in a static initializer. Initializers, like constructors, cannot return a value. Remove the return statement, and then compile again.
The following sample illustrates this error.
public class Simple{ static int var1; static{ var1 = 0; return; // Error, static initializer cannot use the // return statement. } }
This error message is currently not used.
The compiler detected usage of an intrinsic type name in an assignment statement but did not find .class after the name. This error most often occurs when the .class keyword was omitted. Make the appropriate changes to the statement, and then compile again.
The following sample illustrates this error.
public class Simple{ public static void main (String args[]){ Class x = int;//error: missing '.class' } }
The compiler has detected usage of .class with an intrinsic data type, but either the Microsoft virtual machine or the Java class libraries are based on Java 1.0. Make sure that your class libraries and Microsoft VM are the Java 1.1 versions, and then compile again.
An attempt to define an array of type void was found by the compiler. The void data type is for use with methods to declare the method has no return value and thus cannot be used as an array.
The compiler detected that an inner class has been declared with one of the above mentioned modifiers. Inner classes can only use the private, public, protected, and static modifiers.
The following example illustrates this error.
public class Simple{ //Do something here volatile class InnerClass{ /*error: like outer class, inner classes cannot be defined as volatile */ } }
The compiler detected an attempt to declare a variable or method as static from within an inner class. Unlike regular class declarations, inner classes do not support static members unless the inner class has been declared static. This error can also occur if an interface was defined within an inner class.
The following example illustrates this error.
public class Simple{ //Do something meaningful here class InnerClass{ static int var1; /* error: cannot declare static members in inner class */ } }
The specified inner class has the same name as one of the classes that it is nested under. Make sure you have not duplicated the name of a class that your inner class is nested in.
The following example illustrates this error.
public class Simple{ // Do something meaningful here class InnerClass{ //Do something meaningful here class Simple{ //error: inner class has same name as a parent class } } }
The compiler detected an attempt to declare an interface inside an inner class. Inner class definitions do not support interfaces declared within them.
The following example illustrates this error.
public class Simple{ //Do something meaningful here class InnerClass{ //Do something meaningful here interface MyInterface{ /*error: interfaces cannot be declared inside inner classes */ } } }
The compiler detected that an inner class definition has tried to reference something outside of its scope. Examples of when this can occur are:
The following example illustrates this error.
//This example illustrates the first error situation public class Simple{ int x = 10; static class InnerClass{ public void method1(){ int y = x; /*error: instance variable needed to reference parent variables. */ } } } //This example illustrates the second error situation class A{ int x; } class B{ //Do something meaningful here class InnerClass{ void method1(){ int y = A.this.x; /*error: no instance of A defined. Cannot use the <classname.this.variable> syntax here.*/ } } }
The compiler detected that an inner class's constructor attempted to call a constructor from its outer class using the class name and this(). Inner classes cannot call their outer class's constructors.
The following example illustrates this error.
public class Simple{ int x; Simple(int x){ this.x = x; } class InnerClass{ InnerClass(){ Simple.this(10); //error: cannot call outer class constructor } } }
The compiler detected that an attempt was made in an inner class to reference an outer class member using the this keyword with a name other than an outer class's name. Only the name of the outer class can be used from an inner class to reference members of the outer class.
The following example illustrates this error.
public class Simple{ int x; class InnerClass{ void method1(){ int j = x.this; /*error: only a class name can be used with this to reference outer class */ } } }