JShell

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

JShell is a Java 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, which has been dormant since 2003, and arbitrarily diverged from the Java language.

JShell is a Java 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, which has been dormant since 2003, and arbitrarily diverged from the Java language.

Example

jshell> int a[] = { 0, 1, 3, 5, 8 } a ==> int[5] { 0, 1, 3, 5, 8 } jshell> int fact(int n) { ...> return n } | created method fact(int) jshell> for (int i = 0; i a[i] = fact(a[i]); jshell> a a

> int[5] { 1, 1, 6, 120, 40320 }

See also

Exploratory programming

References==

Text derived from https://en.wikipedia.org/w/index.php?oldid=1374345138 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

4 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.