Historical navigation

JShell remembers the snippets and commands that you enter. It maintains this history so that you can reuse snippets and commands you already entered. To cycle through snippets and commands, you can hold down the Ctrl key (cmd on Mac) and then use the up and down arrow keys until you see the snippet or command you want.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.