-2

I have only one line that's declaring a variable. Yet it's giving me problems, so far, I have tried:

  • remaking the project, making sure it is an Android Application Project
  • deleting everything but that line, that's why there's only one line
  • referring to the package (really out of ideas)

Yet, I'm getting:

    Syntax error, insert "EnumBody" to complete CompilationUnit

With two variables declared I get on the previously declared variables:

    Syntax error on tokens, delete these tokens

To me, this doesn't make any sense

Dominic Grenier
  • 337
  • 1
  • 4
  • 14

1 Answers1

2

In Java there is no concept of global variables. All the code should go either in a class, interface or enum.

Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136