Zum Hauptinhalt springen Zur Suche springen Zur Hauptnavigation springen
Beschreibung

The professional programmer's Deitel® guide to Java with integrated generative AI

Written for programmers with a background in another high-level language, in Java for Programmers: with Generative AI, Fifth Edition, you'll learn modern Java development hands on using the latest Java idioms and features and genAIs.

In the context of 200+ real-world code examples, you'll quickly master Java fundamentals then move on to arrays, strings, regular expressions, JSON/CSV processing with the Jackson library, private- and public-key cryptography, classes, inheritance, polymorphism, interfaces, dependency injection, exceptions, generic collections, custom generics, functional programming with lambdas and streams, JavaFX GUI, graphics and multimedia, platform threads, virtual threads, structured concurrency, scoped values, building API-based Java genAI apps, database with JDBC and SQLite, the Java Platform Module System and JShell for Python-like interactivity.

Features:

  • GenAI Prompt Engineering, API Calls, 600 GenAI Exercises
  • ChatGPT, Gemini, Claude, Perplexity
  • Multimodal: Text, Code, Images, Audio, Speech-to-Text, Text-to-Speech, Video
  • Generics: Collections, Classes, Methods
  • Functional Programming: Lambdas & Streams
  • JavaFX: GUI, Graphics, Multimedia
  • Concurrency: Parallel Streams, Virtual Threads, Structured Concurrency, Scoped Values, Concurrent Collections, Multi-Core
  • Database: JDBC, SQL, SQLite
  • Java Platform Module System (JPMS)
  • Objects Natural: Java API, String, BigInteger, BigDecimal, Date/Time, Cryptography, ArrayList, Regex, JSON, CSV, Web Services
  • JShell for Python-Like Interactivity

Want to stay in touch with the Deitels?

  • Contact the authors at [...]
  • Join the Deitel social media communities
    [...]
    [...]
    [...]
    [...]
    [...]
    [...]
  • For source code and updates, visit: [...]

Reviewer Comments
"The future of Java programming is here, and this new edition of Deitel is leading the charge! By embracing genAI head-on, the authors are potentially revolutionizing programming education. Through its integrative approach to the use and study of genAI, this book is positioned to be the leading book in modern Java and its applications. Indeed, I expect that it should be widely adopted by instructors who want to ingrain in their students an appreciation for the critical role that Java will play in data science, machine learning, artificial intelligence, and cybersecurity.

"The book's innovative and forward-thinking use of genAI facilitates reader engagement and inspires readers to think critically about the benefits and limitations of AI as a programming aid. Chapter 19 could become everyone's favorite new Java book chapter--the generative AI API-based code examples are interesting and fun.

"All audiences of this book should read the Preface--there's so much to get excited about! It demonstrates, with refreshing transparency and honesty, how much love and care went into the reinvention of an already outstanding Java book by bringing it into a new frontier of what it means to be a programmer in today's world. Bravo! Your Preface statement: 'GenAI has created an ultra-high-level programming capability that will leverage your Java learning experience and ability to produce robust, top-quality Java software quickly, conveniently and economically.' is a great conclusion to the Preface intro--really helps justify the use of genAI!"
--Brian Canada, Professor of Computational Science, University of South Carolina Beaufort

"After reading your whole book, it was fun to read the Preface that wraps everything up at a high level. You have done some amazing work here, and I'm glad to have been a small part of it as a reviewer! I especially appreciate how difficult it must have been to make sure everything was as up to date as possible with the speed at which things change in this field, and the deftness with which you incorporated all the focus on GenAI and data science that's in this book."
--Emily Navarro, Ph.D., Continuing Lecturer, Department of Informatics, University of California, Irvine

"The generative AI exercises are awesome and reflect the way modern developers work! They are fun and let the reader explore and learn about AI by using AI--how meta. This allows readers to expand their knowledge and get a feel for the AIs' code-related capabilities."
--Jeanne Boyarsky, CodeRanch, Java Champion

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details. (Note: eBooks are 4-color and print books are black and white.)

The professional programmer's Deitel® guide to Java with integrated generative AI

Written for programmers with a background in another high-level language, in Java for Programmers: with Generative AI, Fifth Edition, you'll learn modern Java development hands on using the latest Java idioms and features and genAIs.

In the context of 200+ real-world code examples, you'll quickly master Java fundamentals then move on to arrays, strings, regular expressions, JSON/CSV processing with the Jackson library, private- and public-key cryptography, classes, inheritance, polymorphism, interfaces, dependency injection, exceptions, generic collections, custom generics, functional programming with lambdas and streams, JavaFX GUI, graphics and multimedia, platform threads, virtual threads, structured concurrency, scoped values, building API-based Java genAI apps, database with JDBC and SQLite, the Java Platform Module System and JShell for Python-like interactivity.

Features:

  • GenAI Prompt Engineering, API Calls, 600 GenAI Exercises
  • ChatGPT, Gemini, Claude, Perplexity
  • Multimodal: Text, Code, Images, Audio, Speech-to-Text, Text-to-Speech, Video
  • Generics: Collections, Classes, Methods
  • Functional Programming: Lambdas & Streams
  • JavaFX: GUI, Graphics, Multimedia
  • Concurrency: Parallel Streams, Virtual Threads, Structured Concurrency, Scoped Values, Concurrent Collections, Multi-Core
  • Database: JDBC, SQL, SQLite
  • Java Platform Module System (JPMS)
  • Objects Natural: Java API, String, BigInteger, BigDecimal, Date/Time, Cryptography, ArrayList, Regex, JSON, CSV, Web Services
  • JShell for Python-Like Interactivity

Want to stay in touch with the Deitels?

  • Contact the authors at [...]
  • Join the Deitel social media communities
    [...]
    [...]
    [...]
    [...]
    [...]
    [...]
  • For source code and updates, visit: [...]

Reviewer Comments
"The future of Java programming is here, and this new edition of Deitel is leading the charge! By embracing genAI head-on, the authors are potentially revolutionizing programming education. Through its integrative approach to the use and study of genAI, this book is positioned to be the leading book in modern Java and its applications. Indeed, I expect that it should be widely adopted by instructors who want to ingrain in their students an appreciation for the critical role that Java will play in data science, machine learning, artificial intelligence, and cybersecurity.

"The book's innovative and forward-thinking use of genAI facilitates reader engagement and inspires readers to think critically about the benefits and limitations of AI as a programming aid. Chapter 19 could become everyone's favorite new Java book chapter--the generative AI API-based code examples are interesting and fun.

"All audiences of this book should read the Preface--there's so much to get excited about! It demonstrates, with refreshing transparency and honesty, how much love and care went into the reinvention of an already outstanding Java book by bringing it into a new frontier of what it means to be a programmer in today's world. Bravo! Your Preface statement: 'GenAI has created an ultra-high-level programming capability that will leverage your Java learning experience and ability to produce robust, top-quality Java software quickly, conveniently and economically.' is a great conclusion to the Preface intro--really helps justify the use of genAI!"
--Brian Canada, Professor of Computational Science, University of South Carolina Beaufort

"After reading your whole book, it was fun to read the Preface that wraps everything up at a high level. You have done some amazing work here, and I'm glad to have been a small part of it as a reviewer! I especially appreciate how difficult it must have been to make sure everything was as up to date as possible with the speed at which things change in this field, and the deftness with which you incorporated all the focus on GenAI and data science that's in this book."
--Emily Navarro, Ph.D., Continuing Lecturer, Department of Informatics, University of California, Irvine

"The generative AI exercises are awesome and reflect the way modern developers work! They are fun and let the reader explore and learn about AI by using AI--how meta. This allows readers to expand their knowledge and get a feel for the AIs' code-related capabilities."
--Jeanne Boyarsky, CodeRanch, Java Champion

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details. (Note: eBooks are 4-color and print books are black and white.)

Über den Autor

Paul Deitel, CEO and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of MIT, where he studied Information Technology. He holds the Java Certified Programmer and Java Certified Developer designations, and is an Oracle Java Champion. Through Deitel & Associates, Inc., he has delivered hundreds of programming courses worldwide to clients, including Cisco, IBM, Siemens, Sun Microsystems, Dell, Fidelity, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, White Sands Missile Range, Rogue Wave Software, Boeing, SunGard Higher Education, Nortel Networks, Puma, iRobot, Invensys and many more. He and his co-author, Dr. Harvey M. Deitel, are the world's best-selling programming-language textbook/professional book/video authors.

Dr. Harvey Deitel, Chairman and Chief Strategy Officer of Deitel & Associates, Inc., has over 50 years of experience in the computer field. Dr. Deitel earned B.S. and M.S. degrees in Electrical Engineering from MIT and a Ph.D. in Mathematics from Boston University. He has extensive college teaching experience, including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates, Inc., in 1991 with his son, Paul. The Deitels' publications have earned international recognition, with translations published in Japanese, German, Russian, Spanish, French, Polish, Italian, Simplified Chinese, Traditional Chinese, Korean, Portuguese, Greek, Urdu and Turkish. Dr. Deitel has delivered hundreds of programming courses to corporate, academic, government and military clients.

Inhaltsverzeichnis

Preface xxv
Before You Begin lix

Chapter 1: Intro, Test-Driving a Java Application, and Generative AI 1
1.1 Introduction 2
1.2 Hardware 4
1.3 Java 7
1.4 A Brief Review of Object Orientation 8
1.5 Java Application Programming Interface (API) and Open-Source Libraries 11
1.6 Typical Java Program Development Environment 12
1.7 Test-Driving a Java Program with the Java Development Kit (JDK) 15
1.8 Internet, World Wide Web, the Cloud and IoT 18
1.9 Metaverse 22
1.10 Software Development Technologies 25
1.11 Data Analytics and Data Science 27
1.12 How Big Is Big Data? 28
1.13 AI--at the Intersection of Computer Science and Data Science 32
1.14 Generative AI 35
1.15 Wrap-Up 41

Chapter 2: Intro to Java Programming 47
2.1 Introduction 48
2.2 Your First Program in Java: Printing a Line of Text 48
2.3 Modifying Your First Program 54
2.4 Displaying Text with printf 56
2.5 Another Program: Adding Integers 57
2.6 Arithmetic 60
2.7 Decision Making: Equality and Relational Operators 62
2.8 Objects-Natural Case Study: Creating and Using Objects of the Java API's String Class 65
2.9 Wrap-Up 68

Chapter 3: Control Statements: Part 1 69
3.1 Introduction 70
3.2 Control Structures 70
3.3 if Single-Selection Statement 73
3.4 if...else Double-Selection Statement 74
3.5 while Iteration Statement 77
3.6 Counter-Controlled Iteration 79
3.7 Sentinel-Controlled Iteration 83
3.8 Nested Control Statements 87
3.9 Compound Assignment Operators 91
3.10 Increment and Decrement Operators 91
3.11 Primitive Types 94
3.12 Objects-Natural Case Study: Super-Sized Integers 94
3.13 Wrap-Up 98

Chapter 4: Control Statements: Part 2 99
4.1 Introduction 100
4.2 Essentials of Counter-Controlled Iteration 100
4.3 for Iteration Statement 101
4.4 Examples Using the for Statement 104
4.5 Summing the Even Integers from 2 to 20 with the for Statement 105
4.6 Calculating Compound Interest with the for Statement 106
4.7 do...while Iteration Statement 109
4.8 switch Multiple-Selection Statement 111
4.9 break and continue Statements 116
4.10 Logical Operators 118
4.11 Objects-Natural Case Study: Precise Monetary Calculations with Java API Class BigDecimal 124
4.12 Wrap-Up 128

Chapter 5: Methods 131
5.1 Introduction 132
5.2 Declaring Methods 132
5.3 Notes on Declaring and Using Methods 136
5.4 Case Study: Die Rolling Simulation with Random-Number Generation 137
5.5 Case Study: A Game of Chance; Introducing enums 142
5.6 Scope of Declarations 147
5.7 Method Overloading 150
5.8 Class Math: static Methods and Variables 152
5.9 Java API Packages 154
5.10 Method-Call Stack and Activation Records 156
5.11 Argument Promotion and Casting 159
5.12 Objects-Natural Case Study: Java Date/Time API 161
5.13 Wrap-Up 167

Chapter 6: Arrays and ArrayLists 169
6.1 Introduction 170
6.2 Primitive Types vs. Reference Types 171
6.3 Arrays 171
6.4 Declaring and Creating Arrays 172
6.5 Creating and Initializing an Array 173
6.6 Array Initializers 175
6.7 Calculating Array Element Values 176
6.8 Totaling Array Elements 177
6.9 Intro to Visualization: Using a Bar Chart to Display Array Data Graphically 177
6.10 Using Array Elements as Counters 179
6.11 Analyzing Survey Results 181
6.12 Exception Handling 183
6.13 Enhanced for Statement: Totaling Array Elements 184
6.14 Passing Arrays to Methods 186
6.15 Pass-By-Value vs. Pass-By-Reference 188
6.16 Multidimensional Arrays 189
6.17 Variable-Length Argument Lists 193
6.18 Command-Line Arguments 194
6.19 Class Arrays 197
6.20 Objects-Natural Case Study: Intro to Collections and Class ArrayList 199
6.21 Wrap-Up 204

Chapter 7: Strings, NLP and Regex: Generative AI Foundations 207
7.1 Introduction 208
7.2 Fundamentals of Characters and Strings 209
7.3 Class String 210
7.4 Class StringBuilder 225
7.5 Class Character 232
7.6 Tokenizing Strings 237
7.7 Intro to Natural Language Processing (NLP)--at the Root of Generative AI 238
7.8 Objects-Natural Case Study: Intro to Regular Expressions in NLP 240
7.9 Objects-Natural Security Case Study: pMa5tfEKwk59dTvC04Ft1IFQz9mEXnkfYXZwxk4ujGE= 252
7.10 Wrap-Up 260

Chapter 8: Real-World Modeling with Custom Classes 261
8.1 Introduction 262
8.2 Instance Variables, set Methods and get Methods 263
8.3 Default and Explicit Instance Variable Initialization 271
8.4 Account Class: Initializing Objects with Constructors 271
8.5 Account Class with a Balance 274
8.6 Case Study: Card Shuffling and Dealing Simulation 278
8.7 Case Study: Time Class 283
8.8 Controlling Access to Members 286
8.9 Referring to the Current Object's Members with the this Reference 287
8.10 Case Study: Time Class Overloaded Constructors 289
8.11 Default and No-Argument Constructors 296
8.12 Notes on Set and Get Methods 296
8.13 Composition 297
8.14 enum Types 300
8.15 Garbage Collection 303
8.16 static Class Members 303
8.17 static Import 307
8.18 final Instance Variables 308
8.19 Package Access 309
8.20 record Classes 310
8.21 Wrap-Up 315

Chapter 9: Real-World Modeling with Inheritance, Polymorphism & Interfaces 317
9.1 Introduction 318
9.2 Superclasses and Subclasses 320
9.3 Relationship Between Superclasses and Subclasses 322
9.4 Class Object 332
9.5 Intro to Polymorphism: Polymorphic Video Game 332
9.6 Demonstrating Polymorphic Behavior 333
9.7 abstract Classes and Methods 336
9.8 Case Study: Payroll System Using Polymorphism 338
9.9 final Methods and Classes 347
9.10 Issues with Constructors Calling Instance Methods 348
9.11 Creating and Using Interfaces 349
9.12 Other Interface Features 357
9.13 Program to an Interface, Not an Implementation 359
9.14 sealed Classes and Interfaces 367
9.15 private Constructors 370
9.16 protected Members 370
9.17 Wrap-Up 372

Chapter 10: Exception Handling: A Deeper Look 375
10.1 Introduction 376
10.2 Example: Divide by Zero without Exception Handling 378
10.3 Example: Handling ArithmeticExceptions and InputMismatchExceptions 380
10.4 Java Exception Hierarchy 384
10.5 Checked vs. Unchecked Exceptions 386
10.6 finally Block 388
10.7 Stack Unwinding and Obtaining Information from an Exception 390
10.8 Chained Exceptions 394
10.9 Declaring Custom Exceptions 396
10.10 Preconditions and Postconditions 397
10.11 Assertions 398
10.12 try-with-Resources Statement: Automatic Resource Deallocation 399
10.13 Unnamed Variables in catch Handlers 401
10.14 Wrap-Up 402

Chapter 11: Files, I/O Streams, JSON Serialization & CSV Files 405
11.1 Introduction 406
11.2 Files and Streams 407
11.3 Using NIO Classes and Interfaces to Get File and Directory Information 409
11.4 Sequential Text Files 413
11.5 Case Study: JavaScript Object Notation (JSON) Serialization 418
11.6 Case Study: Processing a JSON Response from a Web Service 424
11.7 Case Study: Creating and Reading CSV Files 432
11.8 Case Study: Reading and Analyzing a CSV File Containing the Titanic Disaster Dataset 437
11.9 Objects-Natural Security Case Study: RSA Public-Key Cryptography 445
11.10 Wrap-Up 452

Chapter 12: Generic Collections 455
12.1 Introduction 456
12.2 Collections Overview 457
12.3 Type-Wrapper Classes 458
12.4 Boxing and Unboxing 459
12.5 Lists 459
12.6 Collections Methods 468
12.7 Class PriorityQueue and Interface Queue 480
12.8 Hash Tables 481
12.9 Sets 483
12.10 Maps 486
12.11 Convenience Factory Methods for Creating Immutable Collections 489
12.12 Concurrent Collections 492
12.13 Wrap-Up 492

Chapter 13: Generic Classes and Methods: A Deeper Look 495
13.1 Introduction 496
13.2 Motivation for Generic Methods 496
13.3 Generic Methods: Implementation and Compile-Time Translation 498
13.4 Additional Compile-Time Translation Issues: Methods That Use a Type Parameter as the Return Type 501
13.5 Overloading Generic Methods 505
13.6 Generic Classes 505
13.7 Wildcards in Methods That Accept Type Parameters 513
13.8 Wrap-Up 517

Chapter 14: Functional Programming with Lambdas & Streams 519
14.1 Introduction 520
14.2 Streams and Reduction 521
14.3 Mapping and Lambdas 525
14.4 Filtering 528
14.5 How Elements Move Through Stream Pipelines 530
14.6 Method References 531
14.7 IntStream Operations 534
14.8 Functional Interfaces 540
14.9 Lambdas: A Deeper Look 541
14.10 Stream Manipulations 542
14.11 Stream Manipulations 546
14.12 Stream Manipulations 548
14.13 Creating a Stream from a File 558
14.14 Streams of Random Values 561
14.15 Infinite Streams 562
14.16 Additional Notes on Interfaces 564
14.17 Wrap-Up 564

Chapter 15: JavaFX Graphical User Interfaces: Part 1 567
15.1 Introduction 568
15.2 JavaFX Scene Builder 569
15.3 JavaFX Application Window Structure 570
15.4 Welcome Application: Displaying Text and an Image 571
15.5 Tip Calculator Application: Intro to Event Handling 577
15.6 Features Covered in the Other JavaFX Chapters 594
15.7 Wrap-Up 594

Chapter 16: JavaFX GUI: Part 2 597
16.1 Introduction 598
16.2 Laying Out Nodes in a Scene Graph 598
16.3 Painter Application: RadioButtons, Mouse Events and Shapes 600
16.4 Color Chooser Application: Property Bindings and Property Listeners 610
16.5 Cover Viewer Application: Data-Driven GUIs with JavaFX...

Details
Erscheinungsjahr: 2025
Fachbereich: Programmiersprachen
Genre: Importe, Informatik
Rubrik: Naturwissenschaften & Technik
Medium: Taschenbuch
Inhalt: Kartoniert / Broschiert
ISBN-13: 9780137574735
ISBN-10: 0137574738
Sprache: Englisch
Einband: Kartoniert / Broschiert
Autor: Deitel, Paul
Deitel, Harvey
Auflage: 5th edition
Hersteller: Pearson Education
Verantwortliche Person für die EU: Libri GmbH, Europaallee 1, D-36244 Bad Hersfeld, gpsr@libri.de
Maße: 232 x 177 x 39 mm
Von/Mit: Paul Deitel (u. a.)
Erscheinungsdatum: 06.09.2025
Gewicht: 1,582 kg
Artikel-ID: 132584426

Ähnliche Produkte

Taschenbuch

28,40 €* UVP 43,86 €

Lieferzeit 1-2 Werktage

Taschenbuch