“cannot resolve symbol” means that the Java compiler cannot locate a symbol referenced in your Java source code.

The causes for this common error include:

  • A missing class file
  • A faulty CLASSPATH
  • A symbol name is mispelled or miscapitalized
  • A data type is incorrect, misspelled, or miscapitalized
  • A method is called with the wrong number or types of arguments
  • An undeclared variable

cannot resolve symbol errors can be very difficult to track down. Code carefully!