Book Image

Java 9 with JShell

By : Gaston C. Hillar
Book Image

Java 9 with JShell

By: Gaston C. Hillar

Overview of this book

The release of Java 9 has brought many subtle and not-so-subtle changes to the way in which Java programmers approach their code. The most important ones are definitely the availability of a REPL, known as JShell, which will make experiments and prototyping much more straightforward than the old IDE-based project-led approach. Another, more subtle change can be seen in the module system, which will lead to more modularized, maintainable code. The techniques to take full advantage of object-oriented code, functional programming and the new modularity features in Java 9 form the main subjects of this book. Each chapter will add to the full picture of Java 9 programming starting out with classes and instances and ending with generics and modularity in Java.
Table of Contents (23 chapters)
Java 9 with JShell
Credits
About the Author
Acknowledgement
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

Identifying objects from applications requirements


Whenever you have to solve a problem in the real world, you use elements and interact with them. For example, when you are thirsty, you take a glass, fill it up with water, soda, or your favorite juice, and then you drink. Similarly, you can easily recognize elements, known as objects, from real-world scenarios and then translate them into object-oriented code. We will start learning the principles of object-oriented programming to use them in the Java 9 programming language to develop any kind of applications.

Now, we will imagine we have to develop a RESTful Web Service that will be consumed by mobile apps and a web application. These apps and applications will have different user interfaces and diverse user experiences. However, we don't have to worry about these differences because we will be focused on the Web Service, that is, we will be backend developers.

Artists use different combinations of geometric shapes and organic shapes to...