X
  • January 17, 2019

Using JShell with NetBeans

By Guess Blogger Deepak Vohra 

Java Shell (or JShell) is a new tool introduced in Java 9 for running standalone code snippets.  JShell in NetBeans is explored in six articles. The first article introduces JShell with NetBeans including how to access the JShell.  JShell-only commands such as /list and /save are shell commands to facilitate the use of the tool.  The first article discusses how to run code snippets to import a package or a type. Further, the first article discusses declaring and using variables explicitly.

The second article continues with declaring and using variables; implicit variables. Further, code snippets for String comparison and statements are run in the second article. Resetting JShell is also discussed in the second article.

The third article is all about running code snippets for methods in JShell. Modifying method definition, method overloading, and making a forward reference to a method are discussed as used in JShell. Some JShell specific features for methods are also discussed including listing code snippets for methods, and method modifiers not permitted in a top-level method declaration.

The fourth article is mainly about running code snippets for classes in JShell including declaring a class, modifying a class, using class constructors, extending a class and overriding methods. Further, interfaces, arrays and unchecked exceptions are also discussed.

The fifth article discusses running code snippets for enums and the various control flow statements.

The sixth article discusses lambda expressions, in addition to discussing saving and loading code snippets in JShell.

Using JShell in Java 9 in NetBeans 9.0, Part 1

Using JShell in Java 9 in NetBeans 9.0, Part 2

Using JShell in Java 9 in NetBeans 9.0, Part 3

Using JShell in Java 9 in NetBeans 9.0, Part 4

Using JShell in Java 9 in NetBeans 9.0, Part 5

Using JShell in Java 9 in NetBeans 9.0, Part 6

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services