HOME

TheInfoList



OR:

JShell is a
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
read-eval-print loop which was first introduced in the JDK 9. It is tracked by JEP 222 ''jshell: The Java Shell (Read-Eval-Print Loop)''. One reason why JShell was proposed for Java 9 is the lack of a standard interactive environment for the language; the ''de facto'' library to use a Java REPL was often
BeanShell BeanShell is a small, free, embeddable Java source interpreter with object scripting language features, written in Java. It runs in the Java Runtime Environment (JRE), dynamically executes standard Java syntax and extends it with common scripting c ...
, which has been dormant since 2003, and arbitrarily diverged from the Java language.


Example

jshell> int a[] = 
a 

> int[5] jshell> int fact(int n) , created method fact(int) jshell> for (int i=0 ; i a[i] = fact(a[i]); jshell> a a

> int[5]


See also

* Exploratory programming


References

Command shells Cross-platform software
Virtual machine In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized h ...
Java platform software Interpreters (computing) {{prog-lang-stub