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

Compartir libro
  1. 690 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Learn Java 12 Programming

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

Nick Samoylov

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Learn Java 12 Programming un PDF/ePUB en línea?
Sí, puedes acceder a Learn Java 12 Programming de Nick Samoylov en formato PDF o ePUB, así como a otros libros populares de Computer Science y Computer Science General. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2019
ISBN
9781789958485
Edición
1

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 ...

Índice