更新时间:2021-07-02 21:47:26
coverpage
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Java Virtual Machine
JVM implementations
Why develop on JVM?
JVM adapts to market changes
Java Class Library
Ecosystem
Scenario 1 – Using a JVM application server
Scenario 2 – Using a general high-level web application framework
Scenario 3 – Using a microservice framework
Popular use cases
Web applications
Big data
IoT
JVM concepts
Virtual machine
The JIT compiler
Primitive datatypes
Classes
Reference types
References and null references
Garbage collector
Example
Backward compatibility
Build tools
Java editions
Java SE
Java EE
Example – Java Persistence API as implemented by two application servers
Java ME
Other languages on JVM
Why choose a language other than Java?
Java is a very verbose language
Java is not ideal for everything or everyone
Missing classes in Java Class Library
Mixing JVM languages in a project
Increasing build process complexity
Language runtime libraries
Writing unit tests in a different language
Summary
Developing on the Java Virtual Machine
JDK
Installing JDK
Downloading JDK
Installing JDK on Windows
Installing JDK on macOS
Installing JDK on Linux
Downloading API documentation
Exploring JDK
The directory structure
JDK commands
GUI monitoring tools
Java VisualVM
Oracle Mission Control
JConsole
JRE
Class organization with packages
What are packages?
Choosing a package name
Package name examples
Fully qualified class name
Java Class Library organization
Package overview
Fundamental classes of the java.lang package
The Object class (java.lang.Object)
Important object methods
The String class (java.lang.String)
Primitive wrapper classes (Integer Long Short Char Float Double in java.lang)
Autoboxing examples
Exceptions and errors (java.lang.Exception and java.lang.Error)
The Collections API - java.util.ArrayList and java.util.HashMap
ArrayList (java.util.ArrayList)
Commonly used methods of the ArrayList class
ArrayList usage example
HashMap (java.util.HashMap)
Commonly used methods of the HashMap class
HashMap usage example
Preparing your classes for the Collections API
About hashCode()
About equals ()