[英]What other than java.lang packages are imported automatically in the JShell?
I've observed that in the JShell session, not only package "java.lang", but quite a few other packages (that are not imported automatically in the Java class files, eg LinkedList
, Math
and several other types) seem to be imported , 默認。
我想知道,默認情況下,JShell session 中還有哪些其他包可用,以及與普通 class 文件區別的原因是什么?
我在JEP 222上找不到任何東西,既不是這種自動/隱式導入的動機,也不是 - 實際導入的文檔。
您可以運行/import
來找出:
jshell> /import
| import java.io.*
| import java.math.*
| import java.net.*
| import java.nio.file.*
| import java.util.*
| import java.util.concurrent.*
| import java.util.function.*
| import java.util.prefs.*
| import java.util.regex.*
| import java.util.stream.*
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.