What is in Java the 'system default package'?
Anyone knows what that is?
Thanks.I believe it means a system-dependent package name that is used as a fallback when the first two steps fail to find an appropriate URLStreamHandler
. It is unrelated to the default package.
The default package is basically no package at all. If you were to ommit the package declaration when defining a new class. The difference seems to be the word "system." Looking through the implementation of URL.class in rt.jars it seems to check sun.net.www.protocol
I would guess that is the system default package it is referring to.
Again the name 'system' default package seems to imply a difference between default package.
Keep in mind sun.net.www.protocol
is only valid for a specific implementation of the JVM by Sun.
精彩评论