The method x declared in class y cannot override the method of the same signature declared in class z
Applies to:
NA
Description:
The method in a subclass unsuccessfully overrides a method in a superclass
Cause:
The return types are different
Applies to:
NA
Description:
The method in a subclass unsuccessfully overrides a method in a superclass
Cause:
The return types are different
Applies to:
NA
Description:
A try block does not contain a catch block
Cause:
The try block is omitted.
Applies to:
NA
Description:
There is more than one declaration of the same variable in the same method
Cause:
The variable is declared more than once:
public void myTest()
{
int x = 0;
System.out.println(x);
int x = 8;
System.out.println(x);
}
Applies to:
NA
Description:
A variable being accessed is not yet initialized
Cause:
An uninitialized variable is being accessed:
int x;
System.out.println(x);
Applies to:
NA
Description:
The source filename and class name defined in the file are not the same
Cause:
Example is the filename is Test and the class name is MyTest.
Applies to:
NA
Description:
A variable of type double is assigned to int
Cause:
Example is:
double y = 3.14;
int x;
x = y;
Applies to:
NA
Description:
The compiler does not recognize the class name you used
Cause:
a. Typographical and case issues
b. The class used is not imported
public class Input
{
public static void main( String [] args )
{
Scanner scan = new Scanner( System.in );
// code here
Applies to:
NA
Description:
A boolean operator is being used with an operand that does not equal to true or false
Cause:
The AND (&&) operator is used with integer or floating point operands inside an if or while statement:
int x = 2, y = 3, z = 2;
if ( x == y && z )
System.out.println( “Errorl” );
Applies to:
NA
Description:
A boolean operator is being used with an operand that does not equal to true or false
Cause:
The OR (||) operator is used with integer or floating point operands inside an if or while statement:
int x = 2, y = 3, z = 2;
if ( x == y || z )
System.out.println( “Errorl” );
Applies to:
Java 2 Platform SE v1.4.2
Description:
A compiler error that is thrown when an application tries to call an abstract method.
Cause:
a. Missing bridge for final method
b. Classes are compiled without abstract methods