java 9 repl -> jshell

jshell
--
jshell> void helloWorld() { System.out.println("Hello world");}
|  created method helloWorld()
--

jshell> helloWorld()
Hello world
--
jshell> int i = 0;
i ==> 0
|  created variable i : int
 
jshell> String company = "Baeldung"
company ==> "Baeldung"
|  created variable company : String
 
jshell> Date date = new Date()
date ==> Sun Feb 26 06:30:16 EST 2017

|  created variable date : Date

/save
/list
/var
/methods
/imports
/history
/open repl.java
/help or /?

No comments:

Post a Comment