Step 12:Packages – 7th hour + code

Definition

– Group of similar types of classes, interfaces and subpackages.

Categories-

1- Built in packages

– also called as predefined packages in java
 i.e- java.lang, java.util, java.io etc

2- User defined packages

-also called as developer/user defined packages

[To use class of other package, we have 3 options to choose]

a- using fully qualified name
qlfdname
b- by importing package.class (recommended)
pck-clas

c- by importing full package*
pck-ful

Note– importing package doesn’t include subpackage

Static Import

used to import only static member of a class instead of class.
pck-sttc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.