I'm trying to declare the following method:
public void catch(Entity ball) {
}
But I get the following error: Syntax error on token "catch", Identifier expected.
Is there anyway to resolve this?
I'm trying to declare the following method:
public void catch(Entity ball) {
}
But I get the following error: Syntax error on token "catch", Identifier expected.
Is there anyway to resolve this?
catch
is a reserved word in java take a look here Java Language Keywords, so if you use any of the words in the the list you still get the same error