search
HomeJavaJavaBaseWhat does import java.util.* mean?

What does import java.util.* mean?

Jul 04, 2020 pm 03:52 PM
java

[import java.util.*;]Import the class interface in the java.util package. The function of import in Java is to import the class interface in the package to be used. Import is at the beginning of the java file. First explain which categories will be used, and then we can specify a class in the code using only the class name.

What does import java.util.* mean?

import java.util.*;Import the class interface in the java.util package.

The function of import in Java is to import the class interface in the package to be used. Import is at the beginning of the java file. First explain which categories will be used. Then we can specify a class in the code using only the class name, that is, only call it by its first name, not its last name. The role of the package is to sort and classify Java classes. Java classes with different business logic are placed in the same package. Such as physical packages and tool kits.

Java's utility class library java.util package. In this package, Java provides some practical methods and data structures. This chapter introduces the Java utility class library java.util package. In this package, Java provides some practical methods and data structures. For example, Java provides the Date (Data) class and Calendar (Calendar) class to generate and obtain dates and times, provides the Random Number (Random) class to generate various types of random numbers, and also provides Stack (Stack) and Vector (Vector). , bitset (Bitset) and hash table (Hashtable) and other classes to represent the corresponding data structure.

In high-level programming languages, if you want to use a certain class or interface, you must use import to import this class. For example, when writing a servlet in Java and using httpServlet, you must add it at the beginning of the file (package After) write, import javax.servlet.http.*; means importing all the files in the javax.servlet.http package.

Recommended tutorial: "java tutorial"

The above is the detailed content of What does import java.util.* mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools