Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is in Java the 'system default package'?

Tags:

java


While researching the URLConnection class I stumbled on a reference to system default package in the API docs for the URL class here.

Anyone knows what that is?
Thanks.

like image 778
Opher Avatar asked Jan 07 '11 19:01

Opher


People also ask

Which package is involved with default?

java. lang package is imported by default, no need to explicitly import it. Classes in the java. lang package do not need to be imported (the compiler acts like they are always imported).

Is Java Lang a default package?

No, java. lang package is a default package in Java therefore, there is no need to import it explicitly. i.e. without importing you can access the classes of this package.

What are system packages in Java?

A package in Java is used to group related classes. Think of it as a folder in a file directory. We use packages to avoid name conflicts, and to write a better maintainable code. Packages are divided into two categories: Built-in Packages (packages from the Java API)

Which package contains system in Java?

The System is one of the core classes in Java and belongs to the java. lang package.


1 Answers

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.

like image 96
Cameron Skinner Avatar answered Nov 01 '22 20:11

Cameron Skinner