
Code with Java 21
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions


Content
- Intro
- Cover
- Title Page
- Copyright Page
- Dedication Page
- About the Author
- About the Reviewer
- Acknowledgement
- Preface
- Table of Contents
- 1. Getting to Know Java
- Introduction
- Structure
- Objectives
- Why code with Java?
- Configuring your environment
- Operating System
- Java Runtime Environment
- Java Development Kit
- JDK vendors and editions
- Installation
- Windows
- MacOS
- Linux
- Version management
- Integrated Development Environment
- Java dependency management
- Source control
- Git installation
- Object-oriented programming
- Encapsulation
- Inheritance
- Abstraction
- Polymorphism
- Static polymorphism
- Dynamic polymorphism
- Advantages of OOP
- What is new in Java 21?
- Virtual threads
- Sequenced Collections
- String templates
- Conclusion
- Points to remember
- 2. Fundamental Programming Structures
- Introduction
- Structure
- Objectives
- Getting started
- Maven
- HelloWorld
- Anonymous main classes
- Variables and formatting
- Reading input
- Error handling
- If statements
- Switch/case statements
- Loops
- For loops
- While loops
- Do loops
- Files
- Writing to a file
- Reading from a file
- Reading row properties from a file
- Methods and constructors
- Conclusion
- Points to remember
- 3. Strings, Characters, and Regular Expressions
- Introduction
- Structure
- Objectives
- Characters
- ASCII art
- Strings
- substring
- toUpperCase
- toLowerCase
- String equality
- Equality of string suffixes
- Equality of string prefixes
- contains
- Regular expressions
- Conclusion
- Points to remember
- 4. Arrays, Collections, and Records
- Introduction
- Structure
- Objectives
- Arrays
- Multi-dimensional arrays
- Collections and maps
- Sets
- HashSet
- LinkedHashSet
- TreeSet
- ArrayList
- LinkedList
- Maps
- HashMap
- LinkedHashMap
- TreeMap
- Sequenced collections
- Records
- Building a simple example
- RPGSimulation class
- Player class
- Hero class
- RPGSimulation class continued
- Conclusion
- Points to remember
- 5. Arithmetic Operations
- Introduction
- Structure
- Objectives
- Integer arithmetic
- Addition
- Testing add() with JUnit
- Subtraction
- Multiplication
- Division
- Modulo
- Exponent
- Floating point arithmetic
- Addition
- Nuances with floating point arithmetic
- Subtraction
- Multiplication
- Division
- Formatting floating point values
- Exponent
- Square root
- Cube root
- Absolute value
- Conclusion
- Points to remember
- 6. Common Data Structures
- Introduction
- Structure
- Objectives
- Stacks
- Queues
- Linked lists
- Binary trees
- Conclusion
- Points to remember
- 7. Working with Databases
- Introduction
- Structure
- Introduction to databases
- Short history of databases
- CAP theorem
- Consistency
- Availability
- Partition tolerance
- CAP designations
- PostgreSQL
- ElephantSQL
- Schema
- Loading data
- Querying data
- Accessing from Java
- Apache Cassandra
- Astra DB
- Schema
- Loading data
- Querying data
- Accessing from Java
- Choosing the right database
- Conclusion
- Points to remember
- 8. Web Applications
- Introduction
- Structure
- Objectives
- Restful operations
- Restful URIs
- Simple operations
- Web services with Spring Boot
- MVC
- Weather application controller
- Hello world service endpoint
- Weather Application model
- Define a new keyspace
- Define a new table
- Generate a new token
- Set application properties and environment variables
- pom.xml redux
- WeatherPrimaryKey class
- WeatherEntity class
- WeatherReading class
- WeatherAppRepository interface
- Building our response JSON objects
- Measurement class
- CloudLayer class
- Properties class
- Geometry class
- LatestWeather class
- Weather application controller redux
- Building web user interfaces
- pom.xml redux
- Weather application view
- Horizontal build methods
- Running the weather application
- Conclusion
- Points to remember
- 9. Graphics in Java
- Introduction
- Structure
- Objectives
- Simple graphics with AWT and Swing
- SimpleDraw class
- MyPanel class
- Animation
- Planet class
- SolarSystem class
- DrawPlanets class
- Java Breakout
- pom.xml
- Ball class
- Brick class
- Paddle class
- KeyHandler class
- BreakoutPanel class
- BreakoutGame class
- Conclusion
- Points to remember
- 10. Final Java Project
- Introduction
- Structure
- Introducing movie application
- Architecture
- Database
- Database selection
- Create a new vector database
- Table design
- Data loader
- pom.xml
- CassandraConnection class
- AstraConnection class
- Movie class
- MovieDataLoader class
- Querying the data
- Creating the movie application project
- Images directory
- pom.xml
- application.yml
- Model
- Movie class
- MovieRepository interface
- MovieByTitle class
- MovieByTitleRepository interface
- Controller
- MovieAppController class
- Querying the service
- Movies by ID
- Movies by title
- Movie recommendations
- View
- MovieAppMainView class
- Conclusion
- Points to remember
- Appendix A: References
- Appendix B: UTF Conversion Chart
- Appendix C: Database Command Reference
- SELECT
- INSERT
- UPDATE
- DELETE
- CREATE TABLE
- CREATE INDEX
- Appendix D: Common HTTP Response Codes
- Appendix E: Common Color Codes
- Appendix F: Garbage Collection
- Index
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.