Undefined variable or class name

  • Share
  • Share

Applies to:
NA

Description:
This is a syntax error that is similar to “Undefined variable” error, the compiler here is uncertain if a class or variable is being referred

Cause:
a. Standard typographical error or capitalized letters issue
b. The variable might be declared in the wrong block of code

JAVA-Compiler , , , ,

  1. admin
    March 9th, 2009 at 18:22 | #1

    Check variable and class names for typographical error and capitalization issue as variables and classes are case-sensitive.

    Example: int x = math.abs(y); must be int x = Math.abs(y);

  2. admin
    March 9th, 2009 at 18:22 | #2

    Make sure that the variable is declared inside the correct block of code where it is used.

  1. No trackbacks yet.