Java Package
Class -Bsc CS II year
Subject- Object Oriented Programming using Java
Subject type-Major I
Compiled by-Asst Professor Sulochana Patidar
Java Packages
A package in Java is a mechanism to group related classes, interfaces, and sub-packages into a single unit. Packages help organize large applications, avoid naming conflicts, provide access protection, and make code modular and maintainable.Avoiding name conflicts (two classes with the same name can exist in different packages)
Providing access control using public, protected, and default access
Reusability: packaged code can be imported and used anywhere
Encouraging modular programming
Types of Java Packages
packages_
Types of Package
1. Built-in Packages
Built-in Packages comprise a large number of classes that are part of the Java API. Some of the commonly used built-in packages are:
java.lang: Contains language support classes(e.g, classes that define primitive data types, math operations). This package is automatically imported.
java.io: Contains classes for supporting input/output operations.
java.util: Contains utility classes that implement data structures such as Linked Lists and Dictionaries, as well as support for date and time operations.
java.applet: Contains classes for creating Applets.
java.awt: Contains classes for implementing the components for graphical user interfaces (like buttons, menus, etc).
2. User-defined Packages
User-defined Packages are the packages that are defined by the user.
The Department of Computer Science is dedicated to building strong technical foundations, logical thinking, and problem-solving skills among students. The department offers structured learning in core areas such as programming, data management, software applications, and emerging digital technologies. With a focus on both theoretical concepts and practical exposure, students are encouraged to develop computational skills relevant to academics, careers, and higher studies. This Study Material Portal has been designed to provide Computer Science students with organized access to syllabus-based notes, practical manuals, coding resources, assignments, and reference materials, supporting effective and self-paced learning.
0 comments:
Post a Comment