Appendix B. The top ten-ish topics that didn’t make it into the rest of the book...

image

We covered a lot of ground, and you’re almost finished with this book. We’ll miss you, but before we let you go, we wouldn’t feel right about sending you out into JavaLand without a little more preparation. We can’t possibly fit everything you’ll need to know into this relatively small appendix. Actually, we did originally include everything you need to know about Java (not already covered by the other chapters), by reducing the type point size to .00003. It all fit, but nobody could read it. So, we threw most of it away, but kept the best bits for this Top Ten-ish appendix. Yep, there’s more than ten Really Useful Things that you still need to know.

This really is the end of the book. Except for the index (a must-read!).

#11 JShell (Java REPL)

Java 9+

Why do you care?

A REPL (Read Eval Print Loop) lets you run snippets of code without needing a full application or framework. It’s a great way to try out new features, experiment with new ideas, and get immediate feedback. We’ve put this right at the start of this appendix in case you want to use JShell to try out some of the features we’ll be talking about in the following pages.

Starting the REPL

JShell is a command-line tool that comes part of the JDK. If JAVA_HOME/bin is on your system’s path, you can just type “jshell” ...

Get Head First Java, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.