Course Image

JShell Basics

Core Java Start Course

JShell is a great tool for Java developers that revolutionizes the way you can prototype and quickly try out Java syntax. It is not only a great learning tool, it can be used as an important utility in the development workflow for experienced Java developers to save time and get better results. In this course, you'll learn how to start using JShell and its features.

This course covers:

  • Installing Java and using JShell
  • Creating variables and methods directly in the shell
  • Using JShell commands to navigate and manage your JShell session
  • Understanding how JShell actually works under the hood
  • Saving and retrieving sessions, creating custom startup scripts
  • Using external libraries in JShell

Getting familiar with JShell

This unit introduces you to JShell. Get it started and learn how to run Java commands and syntax using the JShell prompt. Get familiar with teh JShell commands to navigate and control your session.

 Introduction
 Setup and run
 Declaring and using variables
 Scratch variables
 JShell commands
 Multi line statements
 Methods
 Forward references

Classes and objects with JShell

Learn how to work with classes and objects in your JShell session. Create your own classes directly from the shell and instantiate objects from them. Also learn how JShell actually works by creating a top level class behind the scenes.

 How JShell works
 Exceptions
 Imports
 Working with classes and instances
 Creating classes
 Using edit

Advanced JShell commands

Now that you are familiar working with Java in JShell, learn about a few more JShell commands and features that makes your life easier when working with the shell. Learn how to save and open sessions, create startup scripts and more.

 Saving and opening JShell sessions
 Creating startup scripts
 Using external libraries
 Conclusion