Check out example codes for "java in terminal". It will help you in understanding the concepts better.

Code Example 1

jshell
|  Welcome to JShell -- Version 12.0.1
|  For an introduction type: /help intro

jshell> int i=99;
i ==> 99

jshell> System.out.println(i);
99

Learn ReactJs, React Native from akashmittal.com