When I try to create a package implements
using Intellij (community edition) I got message Not a valid package name
. Is this because of the keyword being used?
Is this because of the keyword being used?
Yes, a package name has the following form
PackageDeclaration:
{PackageModifier} package Identifier {. Identifier} ;
where Identifier
is
Identifier:
IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral
IdentifierChars:
JavaLetter {JavaLetterOrDigit}
JavaLetter:
any Unicode character that is a "Java letter"
JavaLetterOrDigit:
any Unicode character that is a "Java letter-or-digit"
So keywords cannot be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With