Wednesday, 14 August 2013

Recursive import Java

Recursive import Java

I am a newbie to Java development. I have a quick question regarding
recursive imports in Java.
Lets assume Package "pkg" contains the following
class A,
package B (This in turn contains B1 class)
package C (This in turn contains C1 class)
If I use import pkg.* why am I not allowed to import classes from packages
"B" and "C" ?.
I would like to understand the rationale behind in Java's not allowing me
to do recursive imports.

No comments:

Post a Comment