Is the absence of a package declaration in the source code acceptable?
Package statement is optional. For small programs it's common to omit it, in which case Java uses empty package that is called a default package.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes