By default, 10 packages are imported and can also be imported any package by using import statement.
To see, default import packages, we can use following command.
Importing java.sql package.
Listing import packages and it will show available accessible packages.
Now number of packages are 11 including new one java.sql.*
Jshell provides various useful commands that we can use to modify environment, manage code and to get code related information. Following are the useful information.
Command /vars to show variables
To get all written source code, use /list
- Using Variables in JShell of Java 9
- JShell (Java 9 New Feature)
- Java.lang.Package class in Java
- Java.util.LinkedList.poll(), pollFirst(), pollLast() with examples in Java
- Java.util.LinkedList.offer(), offerFirst(), offerLast() in Java
- Java.util.Collections.disjoint() Method in java with Examples
- Java.util.LinkedList.peek() , peekfirst(), peeklast() in Java
- Java.lang.Short toString() method in Java with Examples
- Java.util.concurrent.Phaser class in Java with Examples
- Java.util.concurrent.RecursiveTask class in Java with Examples
- Java lang.Long.highestOneBit() method in Java with Examples
- Java lang.Long.numberOfLeadingZeros() method in Java with Examples
- Java lang.Long.numberOfTrailingZeros() method in Java with Examples
- Java lang.Long.lowestOneBit() method in Java with Examples
- Java lang.Long.byteValue() method in Java with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.