Back to Browse

Packages in Java

20 views
May 6, 2024
9:11

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) User-defined Packages (create your own packages) Built-in Packages: The Java API is a library of prewritten classes, that are free to use, included in the Java Development Environment. The library contains components for managing input, database programming, and much much more. The library is divided into packages and classes. Meaning you can either import a single class (along with its methods and attributes), or a whole package that contain all the classes that belong to the specified package Import a Package: There are many packages. In the previous example, we used the Scanner class from the java.util package. This package also contains date and time facilities, random-number generator and other utility classes. To import a whole package, end the sentence with an asterisk sign (*). The following example will import ALL the classes in the java.util package: Example import java.util.*; If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos Python Course full playlist: https://www.youtube.com/playlist?list=PLl0WPZ7_WsfsmztYWasSjNFcuZdtF_a8R C Language Course full playlist: https://youtube.com/playlist?list=PLl0WPZ7_WsfueJ9je8ed9b5CyDzVDACWc Python Course English full playlist: https://www.youtube.com/playlist?list=PLl0WPZ7_WsftacFhSawOhYrI14HEb07hQ Java Course English full playlist: https://www.youtube.com/playlist?list=PLl0WPZ7_WsftBs9u_tUIko2i1G3dPPObZ Subscribe to our channel by clicking here 👉👉🏾 https://www.youtube.com/channel/UCBcy0sGa8AsyJH9CoaDPNhg?sub_confirmation=1 #ARIVU_INFO

Download

0 formats

No download links available.

Packages in Java | NatokHD