TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Monday 20 April 2020

Types Of Package In Java | How to Import Predefined & Userdefined Package In Java

Types of packages

There are two types of java package and they are:
   ·       Built in package
   ·       User define package
Userdefined & Predefined Package
Fig: Types of Package


    1.    Built-in-Packages:-


These packages consist of a large number of classes which are a part of Java API.Some of the commonly used built-in packages are:
package api
Fig: Built in package

1) java.lang: Contains language support classes(e.g classed which defines primitive data types, math operations). This package is automatically imported.


2)  java.io: Contains classed for supporting input / output operations.



3)  java.util: Contains utility classes which implement data structures like Linked List, Dictionary and support ; for Date / Time operations.



4)  java.applet: Contains classes for creating Applets.



5)  java.awt: Contain classes for implementing the components for graphical user interfaces (like button , ;menus etc).



6)  java.net: Contain classes for supporting networking operations.



2.   User-defined-packages:-


These are the packages that are defined by the user. First we create a directory myPackage (name should be same as the name of the package). Then create the MyClass inside the directory with the first statement being the package names.

No comments:

Post a Comment