I have a package com.test.mythingimport
. Ideally, I want this to be called com.test.mything.import
. Are you able to name things with import
or will it cause conflicts?
From JLS §7.4.1
A package declaration in a compilation unit specifies the name (§6.2) of the package to which the compilation unit belongs.
PackageDeclaration: {PackageModifier} package Identifier {. Identifier} ;
where Identifier
is defined in JLS §3.8 as
Identifier: IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral
So a package name can specifically not be a keyword (such as import
), a Boolean (true
or false
) or null
.
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