Learn Java 12 Programming
eBook - ePub

Learn Java 12 Programming

A step-by-step guide to learning essential concepts in Java SE 10, 11, and 12

Nick Samoylov

Buch teilen
  1. 690 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Learn Java 12 Programming

A step-by-step guide to learning essential concepts in Java SE 10, 11, and 12

Nick Samoylov

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

A comprehensive guide to get started with Java and gain insights into major concepts such as object-oriented, functional, and reactive programming

Key Features

  • Strengthen your knowledge of important programming concepts and the latest features in Java
  • Explore core programming topics including GUI programming, concurrency, and error handling
  • Learn the idioms and best practices for writing high-quality Java code

Book Description

Java is one of the preferred languages among developers, used in everything right from smartphones, and game consoles to even supercomputers, and its new features simply add to the richness of the language. This book on Java programming begins by helping you learn how to install the Java Development Kit. You will then focus on understanding object-oriented programming (OOP), with exclusive insights into concepts like abstraction, encapsulation, inheritance, and polymorphism, which will help you when programming for real-world apps. Next, you'll cover fundamental programming structures of Java such as data structures and algorithms that will serve as the building blocks for your apps. You will also delve into core programming topics that will assist you with error handling, debugging, and testing your apps. As you progress, you'll move on to advanced topics such as Java libraries, database management, and network programming, which will hone your skills in building professional-grade apps.

Further on, you'll understand how to create a graphic user interface using JavaFX and learn to build scalable apps by taking advantage of reactive and functional programming.

By the end of this book, you'll not only be well versed with Java 10, 11, and 12, but also gain a perspective into the future of this language and software development in general.

What you will learn

  • Learn and apply object-oriented principles
  • Gain insights into data structures and understand how they are used in Java
  • Explore multithreaded, asynchronous, functional, and reactive programming
  • Add a user-friendly graphic interface to your application
  • Find out what streams are and how they can help in data processing
  • Discover the importance of microservices and use them to make your apps robust and scalable
  • Explore Java design patterns and best practices to solve everyday problems
  • Learn techniques and idioms for writing high-quality Java code

Who this book is for

Students, software developers, or anyone looking to learn new skills or even a language will find this book useful. Although this book is for beginners, professional programmers can benefit from it too. Previous knowledge of Java or any programming language is not required.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Learn Java 12 Programming als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Learn Java 12 Programming von Nick Samoylov im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Computer Science General. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2019
ISBN
9781789958485

Section 1: Overview of Java Programming

The first part of the book brings the reader into the world of Java programming. It starts with basic Java-related definitions and the main terms, walks the reader through the installation of the necessary tools and Java itself, and explains how to run (execute) a Java program and the examples of the code provided with this book.
With the basics in place, we then explain and discuss Object-Oriented Programming (OOP) principles, how Java implements them, and how a programmer can take advantage of them to write high-quality code that is easy to maintain.
The book proceeds by presenting a more detailed view of Java as a language. It explains how the code is organized in packages, defines all the main types, and the list of reserved and restricted keywords. All the discussions are illustrated with specific code examples.
This section contains the following chapters:
Chapter 1, Getting Started with Java 12
Chapter 2, Java Object-Oriented Programming (OOP)
Chapter 3, Java Fundamentals

Getting Started with Java 12

This chapter is about how to start learning Java 12 and Java in general. We will begin with the basics, first explaining what Java is and its main terms, followed by how to install the necessary tools to write and run (execute) a program. In this respect, Java 12 is not much different to the previous Java versions, so this chapter's content is applies to the older versions too.
We will describe and demonstrate all the necessary steps for building and configuring a Java programming environment. This is the bare minimum that you have to have on the computer in order to start programming. We also describe the basic Java language constructs and illustrate them with examples that can be executed immediately.
The best way to learn a programming language, or any language for that matter, is to use it, and this chapter guides the reader on how they can do this with Java. The topics covered in this chapter include the following:
  • How to install and run Java
  • How to install and run an Integrated Development Environment (IDE)
  • Java primitive types and operators
  • String types and literals
  • Identifiers and variables
  • Java statements

How to install and run Java

When somebody says "Java," they may mean quite different things:
  • Java programming language: A high-level programming language that allows an intent (a program) to be expressed in a human-readable format that can be translated in the binary code executable by a computer
  • Java compiler: A program that can read a text written in the Java programming language and translate it into a bytecode that can be interpreted by Java Virtual Machine (JVM) in the binary code executable by a computer
  • Java Virtual Machine (JVM): A program that reads a compiled Java program and interprets it into the binary code that is executable by a computer
  • Java Development Kit (JDK): The collection of programs (tools and utilities), including Java compiler, JVM, and supporting libraries, which allow the compilation and execution of a program written in the Java language
The following section walks the reader through the installation of the JDK of Java 12 and the basic related terms and commands.

What is JDK and why do we need it?

As we have mentioned already, JDK includes a Java compiler and JVM. The task of the compiler is to read a .java file that contains the text of the program written in Java (called source code) and transform (compile) it into a bytecode stored in a .class file. The JVM can then read the .class file, interpret the bytecode in a binary code, and send it to the operating system for execution. Both the compiler and JVM have to be invoked explicitly from the command line.
To support the .java file compilation and its bytecode execution, JDK installation also includes standard Java libraries called Java Class Library (JCL). If the program uses a third-party library, it has to be present during compilation and execution. It has to be referred from the same command line that invokes the compiler and later when the bytecode is executed by JVM. JCL, on the other hand, does not need to be referred to explicitly. It is assumed that the standard Java libraries reside in the default location of the JDK installation, so the compiler and JVM know where to find them.
If you do not need to compile a Java program and would ...

Inhaltsverzeichnis