Quantcast
Channel: Oracle Bloggers
Viewing all articles
Browse latest Browse all 19780

Learning Java with JShell in NetBeans IDE

$
0
0

Let's use JShell to learn about Paths and Files and Streams... here we go... this seems to work, since the Output window prints out the content of my file, which has two lines "hello" and "world":

Sweet documentation explains everything:


Next, let's put that useful code snippet to some use... i.e., we'll move it into a new Java source file in my application:

And there it is, all the verbosity/expressiveness of Java wrapped around our little snippet:

Hmmm. This will be pretty useful for anyone teaching and/or learning Java.


Viewing all articles
Browse latest Browse all 19780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>