
Job Ready Java
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Job Ready Java delivers a comprehensive and foundational approach to Java that is immediately applicable to real-world environments. Based on the highly regarded and effective Software Guild Java Bootcamp: Object Oriented Programming course, this book teaches you the basic and advanced Java concepts you will need at any entry-level Java position.
With the "Pulling It Together" sections, you'll combine and integrate the concepts and lessons taught by the book, while also benefiting from:
* A thorough introduction to getting set up with Java, including how to write, compile, and run Java programs with or without a Java IDE
* Practical discussions of the basics of the Java language, including syntax, program flow, and code organization
* A walk through the fundamentals of Object-Oriented Programming including Classes, Objects, Interfaces, and Inheritance, and how to leverage OOP in Java to create elegant code.
* Explorations of intermediate and advanced Java concepts, including Maven , unit testing, Lambdas, Streams, and the Spring Framework
Perfect for Java novices seeking to make a career transition, Job Ready Java will also earn a place in the libraries of Java developers wanting to brush up on the fundamentals of their craft with an accessible and up-to-date resource.
More details
Other editions
Additional editions

Persons
ALAN GALLOWAY is Director of Instruction at Wiley's Software Guild and mthree. H:e supervises a team of instructors who deliver large-scale training programs in technology.
Content
Lesson 1
Installing Java
Welcome to the world of learning Java. In this first lesson, we will set up everything needed to write Java programs. We will then write our first program together called "Hello, World!"
It is important to know that, by itself, Java code doesn't do anything. It is just text. To make it useful, we need to install the Java Development Kit (JDK). The JDK contains the compiler and other tools needed to create executable Java programs. After the JDK is installed, we will check the configuration by creating, compiling, and running the obligatory "Hello, World!" program.
LEARNING OBJECTIVES
By the end of this lesson, you will be able to:
- Differentiate between the JDK and Java custom runtimes
- Compare OpenJDK to Oracle JDK
- Install a JDK and verify the installation
- Trace the steps to create a "Hello, World!" program using a text editor
- Define syntax as it relates to development
- Explain the pieces of the compiler
- Trace the development of a program through the various parts of compilation and execution of a program
THE JAVA UNIVERSE
Before we get into downloading and installing the Java tools and writing our first program, let's first take a look at the bigger picture: the Java universe, if you will. A little history will help to make sense of where Java is today.
The development of the Java language was led by James Gosling at Sun Microsystems. The initial development started in the early 1990s, and the language was originally called Oak. The first official release of Java was in 1996. Now, in Internet time, 1996 seems like, I don't know, a million years ago. And it seems that Java has this reputation for being an old and creaky language because there are all these newer and cooler languages out there-you know, like Ruby and Python and JavaScript.
But wait-the first version of Ruby was also released in 1995 and the first version of Python was started in 1989, so they aren't really newer languages. JavaScript was called LiveScript when it came on to the scene in 1995. Maybe Java isn't an old language after all.
Java was originally a closed source project, meaning that developers had to purchase a license to use it, and the code that runs Java was accessible only to Sun Microsystems developers. In 2006, however, Sun decided to make the project open source under a newly defined General Public License (GPL). In short, Sun decided to let any developer use Java to write software programs for any purpose at no cost. In addition, the GPL allows developers to access the code that runs Java to tweak it for their own purposes.
In 2010, Oracle bought Sun Microsystems and took over stewardship of Java. Oracle continues to maintain, distribute, and support Java and its related tools, including the JDK and the JVM.
The Java Development Kit
The Java Development Kit is a software package that contains tools that allow developers, like you, to write new Java programs. These tools include things like the Java compiler, which converts the code you write into bytecode that the Java Virtual Machine can read, as well as the JVM itself and tools that allow you to package your creations to distribute to other users.
NOTE
We will be downloading and installing the JDK later in this lesson.
There are two basic versions of the JDK, both maintained and distributed by Oracle: OpenJDK and Oracle JDK. OpenJDK is the open source reference implementation of the JDK. This means that it is the standard from which all other JDK implementations are derived. OpenJDK is released under the GPL v2 license and is completely open to the community. It contains the core code that makes Java work.
The Oracle JDK is based on OpenJDK, but it is a commercial implementation released under the Oracle Binary Code License Agreement.
The two versions have nearly identical code, but the Oracle JDK has a few more classes (some closed source) and some additional bug fixes. Businesses generally use the Oracle JDK because it tends to be a bit more stable; however, most Oracle JDK versions are distributed under a relatively restricted license. You can download the software for free, but you are only allowed to use the free version for personal, noncommercial projects. The free Oracle JDK license excludes the ability to create software that you want to sell or distribute for others to use. Many businesses choose to pay for commercial-use licenses because Oracle Java JDK includes support features not included in the open source versions.
We include instructions in the following sections to install OpenJDK for use in this course. You are welcome to use Oracle JDK instead, if you prefer. We use the open source OpenJDK here because it is completely free for any purpose you want to use it for, including creating and selling your own software packages. While Oracle does allow developers to use its Java JDK at no cost for personal projects, the free license does not allow commercial use. Many businesses choose to purchase licenses for Oracle's Java JDK to take advantage of the additional support that Oracle provides with the commercial version. However, because the JDK is very much behind the scenes when developing software using Java, you are not likely to notice much difference between the two.
The Java Virtual Machine
One of the problems with writing software today is that we normally want our programs to be compatible with as many different types of computers as possible. What good is a killer app if it will run on only one brand of smartphone? What about a custom enterprise application that will run only on a Windows machine, even though many employees may use Apple computers? This is where Java has an advantage over other coding languages.
The Java Virtual Machine (JVM) is a software layer between the Java code and the machine running the software. A virtual machine (VM) is essentially a piece of software that acts like a computer, and it performs many of the same input/process/output operations that a physical computer does.
Essentially, the JVM (which is included in the JDK) acts as a translator between the compiled Java code and the machine's bytecode. This means that our program will run on any computer that the JVM recognizes, so we can write one app that will work on many different devices, rather than writing multiple versions of the same app for different platforms. The result is that we can write once and run anywhere, a process Sun Microsystems named WORA to promote the use of Java.
The Java Runtime Environment
As a Java developer, you may also hear about the Java Runtime Environment (JRE). Through Java version 8, anyone who wanted to run a Java application on their computer had to first install a compatible JRE, which included the JVM required to run compiled software but did not include the tools used to develop software.
Starting with Java 9, however, the JDK includes a packaging process that creates an executable package that does not require a separate JRE on the end user's computer. This streamlines the distribution process a bit, making it even easier to write once and run anywhere when we use Java.
Java 8 is still widely used in many enterprises, however, so it's not impossible that you will run across the need to have a JRE installed to run software written in Java.
INSTALLING OpenJDK
You will need to install the JDK for this book because it has the tools needed to develop Java applications. As mentioned, the JDK also contains the Java runtime, which is the component that allows us to run the Java programs that we (and others) write. You might have a Java runtime already installed on your system because Java is widely used to write software.
NOTE
When we install the JDK, it will simply replace any existing JDK.
For this course, we will use OpenJDK, which you can also use for any project in the future. The following instruction sets can be used to check your current installed version of a JDK and to install OpenJDK if you do not already have it. The following sections cover
- Installing on Microsoft Windows
- Installing on macOS
We recommend installing the most recent long-term support (LTS) version of OpenJDK, which was version 11 at the time of this writing. While you will see newer versions (such as 14), you should choose an LTS version because it will be more stable than newer versions that are still in development. Each version is based on a previous version, however, so you don't want to choose a version that comes before 11-there may be newer features we use in this course that are not available in older versions.
Additionally, while we provide added guidance here for installing a JDK on Microsoft Windows and macOS, you can also install it on other operating systems including various versions of Linux and AIX. The installation would be similar to what is shown here, including starting at the same website.
NOTE
At the end of the day, the JDK is being used to compile and run our Java programs.
Installing OpenJDK on Microsoft Windows
The following instructions walk you through checking for an existing copy of the JDK on Microsoft Windows 10. You'll then install and verify an installation of OpenJDK. If you are using macOS, skip ahead to the next section.
Checking for an Existing JDK on...
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.