Page 1 of 1

Book mentions sub package cannot be imported

Posted: Thu Sep 23, 2021 10:42 pm
by abashdesh
But can it be created in the first place? I mean how can we create a sub package (if at all), what statement can we write if only one package statement is allowed in a class?

Referring to the book - OCP Oracle Certified Professional Java SE 11 Programmer I Exam Fundamentals iZ0-815 - Chapter 2 - The Import Statement > What you cannot do section

Thanks!

Re: Book mentions sub package cannot be imported

Posted: Fri Sep 24, 2021 6:32 am
by admin
Right, if you read further, you will notice that the next line says, "there is no concept of subpackage in Java".

That is why, in the first line also, the word subpackage is within double quotes.

Re: Book mentions sub package cannot be imported

Posted: Sun Oct 10, 2021 12:26 am
by abashdesh
Ok thank you.