2

this bit of code gives me the error message: "Syntax error on token "module", interface expected. Does anyone know why?

module TeaThiever{
}
greg-449
  • 106,591
  • 226
  • 99
  • 140
Lucas Wedel
  • 31
  • 1
  • 2

1 Answers1

2

The module statement is only valid in a module-info.java file and it must be used with Java 9 or above.

In Eclipse set the 'Compiler compliance level' on the project 'Java Compiler' properties page to be Java 9 or above (you also need to have a suitable Java installed).

greg-449
  • 106,591
  • 226
  • 99
  • 140