Home > Java > javaTutorial > Package import in JShell in Java 9

Package import in JShell in Java 9

王林
Release: 2023-09-07 15:37:02
forward
620 people have browsed it

Java 9中JShell中的包导入

Generally, use JShell to import 10 packages.

The following command displays the default imported packages.

jshell> /import
Copy after login

Output

import java.io.*
import java.math.*
import java.net.*
import java.nio.file*
import java.sql.*
import java.util.*
import java.util.regex*
import java.util.function*
import java.util.prefs*
import java.util.stream.*
Copy after login

Use JShell to import specific packages

jshell> import java.util.*;
Copy after login

The above is the detailed content of Package import in JShell in Java 9. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template