JShell
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==
References
- Oracle Announces Java SE 9 and Java EE 8 · retrieved 2017-09-24 · rev 1374345138
Cite this reference
MLA "Oracle Announces Java SE 9 and Java EE 8." 2017-09-24. https://web.archive.org/web/20170922110128/https://www.oracle.com/corporate/pressrelease/java-se-9-and-ee-8-092117.html. Accessed 24 November 2026.
Chicago "Oracle Announces Java SE 9 and Java EE 8." 2017-09-24. https://web.archive.org/web/20170922110128/https://www.oracle.com/corporate/pressrelease/java-se-9-and-ee-8-092117.html.
APA encyclopegia.org. (2017). Oracle Announces Java SE 9 and Java EE 8. Retrieved November 24, 2026, from https://web.archive.org/web/20170922110128/https://www.oracle.com/corporate/pressrelease/java-se-9-and-ee-8-092117.html
- JEP 222: jshell: The Java Shell (Read-Eval-Print Loop) · retrieved 2016-10-31 · rev 1374345138
Cite this reference
MLA "JEP 222: jshell: The Java Shell (Read-Eval-Print Loop)." 2016-10-31. http://openjdk.java.net/jeps/222. Accessed 24 November 2026.
Chicago "JEP 222: jshell: The Java Shell (Read-Eval-Print Loop)." 2016-10-31. http://openjdk.java.net/jeps/222.
APA encyclopegia.org. (2016). JEP 222: jshell: The Java Shell (Read-Eval-Print Loop). Retrieved November 24, 2026, from http://openjdk.java.net/jeps/222
- JEP 222: jshell: The Java Shell (Read-Eval-Print Loop) · retrieved 2016-10-31 · rev 1374345138
Cite this reference
MLA "JEP 222: jshell: The Java Shell (Read-Eval-Print Loop)." 2016-10-31. http://openjdk.java.net/jeps/222. Accessed 24 November 2026.
Chicago "JEP 222: jshell: The Java Shell (Read-Eval-Print Loop)." 2016-10-31. http://openjdk.java.net/jeps/222.
APA encyclopegia.org. (2016). JEP 222: jshell: The Java Shell (Read-Eval-Print Loop). Retrieved November 24, 2026, from http://openjdk.java.net/jeps/222
- JShell, the Java 9 REPL – What does it do? · retrieved 2016-10-31 · rev 1374345138
Cite this reference
MLA "JShell, the Java 9 REPL – What does it do?." 2016-10-31. https://web.archive.org/web/20150905160031/https://jaxenter.com/jshell-the-java-9-repl-what-does-it-do-120299.html. Accessed 24 November 2026.
Chicago "JShell, the Java 9 REPL – What does it do?." 2016-10-31. https://web.archive.org/web/20150905160031/https://jaxenter.com/jshell-the-java-9-repl-what-does-it-do-120299.html.
APA encyclopegia.org. (2016). JShell, the Java 9 REPL – What does it do?. Retrieved November 24, 2026, from https://web.archive.org/web/20150905160031/https://jaxenter.com/jshell-the-java-9-repl-what-does-it-do-120299.html
Cite this article
MLA
"JShell." encyclopegia.org, 2026, https://encyclopegia.org/wiki/jshell. Accessed 24 November 2026.
Chicago
"JShell." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/jshell.
APA
encyclopegia.org. (2026). JShell. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/jshell
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON