How do I import a package named "poof-support" .
No, I can't change the package name, I'm getting an: error '.' expected . The line giving the error is:
import poof-support.exception;
You can't have -
in your package name. So you will need to change the name.
Package names are written in all lower case to avoid conflict with the names of classes or interfaces.
In some cases, the internet domain name may not be a valid package name. This can occur if the domain name contains a hyphen or other special character, if the package name begins with a digit or other character that is illegal to use as the beginning of a Java name, or if the package name contains a reserved Java keyword, such as "int". In this event, the suggested convention is to add an underscore. For example:
incorrect names | correct names --------------------------------------------------------- hyphenated-name.example.org | org.example.hyphenated_name example.int | int_.example 123name.example.com | com.example._123name
check this link for naming conventions of package.
You will have to change its name, since it's illegal to use a dash in a package name. The recommendation is to use an underscore instead.
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