Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Java 9 with JShell

You're reading from   Java 9 with JShell Introducing the full range of Java 9's new features via JShell

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787282841
Length 408 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Gaston C. Hillar Gaston C. Hillar
Author Profile Icon Gaston C. Hillar
Gaston C. Hillar
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. JShell – A Read-Evaluate-Print-Loop for Java 9 FREE CHAPTER 2. Real-World Objects to UML Diagrams and Java 9 via JShell 3. Classes and Instances 4. Encapsulation of Data 5. Mutable and Immutable Classes 6. Inheritance, Abstraction, Extension, and Specialization 7. Members Inheritance and Polymorphism 8. Contract Programming with Interfaces 9. Advanced Contract Programming with Interfaces 10. Maximization of Code Reuse with Generics 11. Advanced Generics 12. Object-Oriented, Functional Programming, and Lambda Expressions 13. Modularity in Java 9 A. Exercise Answers Index

Getting ready for our journey toward OOP with Java 9

In this book, you will learn to take advantage of all the object-oriented features included in the Java programming language version 9, known as Java 9. Some of the examples might be compatible with previous Java versions, such as Java 8, Java 7, and Java 6, but it is essential to use Java 9 or later because this version is not backwards compatible. We won't write code that is backwards compatible with previous Java versions because our main goal is to work with Java 9 or later and to use its syntax and all of its new features.

Most of the time, we won't use any IDE (Integrated Development Environment), and we will take advantage of JShell and many other utilities included in the JDK. However, you can use any IDE that provides a Java 9 REPL to work with all the examples. You will understand the benefits of working with a REPL in the next sections. You will definitely benefit from an IDE in the last chapter where you will explore the new modularity features introduced with Java 9.

Tip

You don't need any previous experience with the Java programming language to work with the examples in the book and learn how to model and create object-oriented code with Java 9. If you have some experience with C#, C++, Python, Swift, Objective-C, Ruby, or JavaScript, you will be able to easily learn Java's syntax and understand the examples. Many modern programming languages have been borrowing features from Java and vice versa. Therefore, any knowledge of these languages will be extremely useful.

In this chapter, we will install the required software on Windows, macOS, or Linux. We will understand the benefits of working with a REPL, specifically, JShell, to learn object-oriented programming. We will learn how to run Java 9 code in the JShell and how to load the source code samples in the REPL. Finally, we will learn how to run Java code on Windows, macOS, and Linux from the command line or terminal.

You have been reading a chapter from
Java 9 with JShell
Published in: Mar 2017
Publisher: Packt
ISBN-13: 9781787282841
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime