JAVA Courses | Java SE 11 Programmer 1

The comprehensive study aide for those preparing for the new Oracle Certified Professional Java SE Programmer I Exam 1Z0-815

Used primarily in mobile and desktop application development, Java is a platform-independent, object-oriented programming language. It is the principal language used in Android application development as well as a popular language for client-side cloud applications. Oracle has updated its Java Programmer certification tracks for Oracle Certified Professional.

OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide covers 100% of the exam objectives, ensuring that you are thoroughly prepared for this challenging certification exam. This comprehensive, in-depth study guide helps you develop the functional-programming knowledge required to pass the exam and earn certification. All vital topics are covered, including Java building blocks, operators and loops, String and StringBuilder, Array and ArrayList, and more. Included is access to Sybex’s superior online interactive learning environment and test bank—containing self-assessment tests, chapter tests, bonus practice exam questions, electronic flashcards, and a searchable glossary of important terms. This indispensable guide:

  • Clarifies complex material and strengthens your comprehension and retention of key topics
  • Covers all exam objectives such as methods and encapsulation, exceptions, inheriting abstract classes and interfaces, and Java 8 Dates and Lambda Expressions
  • Explains object-oriented design principles and patterns
  • Helps you master the fundamentals of functional programming
  • Enables you to create Java solutions applicable to real-world scenarios

There are over 9 millions developers using Java around the world, yet hiring managers face challenges filling open positions with qualified candidates. The OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide will help you take the next step in your career.

Java SE 11 Programmer II Course

The completely-updated preparation guide for the new OCP Oracle Certified Professional Java SE 11 Programmer II exam—covers Exam 1Z0-816

Java, a platform-independent, object-oriented programming language, is used primarily in mobile and desktop application development. It is a popular language for client-side cloud applications and the principal language used to develop Android applications. Oracle has recently updated its Java Programmer certification tracks for Oracle Certified Professional.

OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide ensures that you are fully prepared for this difficult certification exam. Covering 100% of exam objectives, this in-depth study guide provides comprehensive coverage of the functional-programming knowledge necessary to succeed. Every exam topic is thoroughly and completely covered including exceptions and assertions, class design, generics and collections, threads, concurrency, IO and NIO, and more. Access to Sybex’s superior online interactive learning environment and test bank—including self-assessment tests, chapter tests, bonus practice exam questions, electronic flashcards, and a searchable glossary of important terms—provides everything you need to be fully prepared on exam day. This must-have guide:

  • Covers all exam objectives such as inheriting abstract classes and interfaces, advanced strings and localization, JDBC, and Object-Oriented design principles and patterns
  • Explains complex material and reinforces your comprehension and retention of important topics
  • Helps you master more advanced areas of functional programming
  • Demonstrates practical methods for building Java solutions

OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide will prove invaluable for anyone seeking achievement of this challenging exam, as well as junior- to senior-level programmers who uses Java as their primary programming language.

Instructor Led Learning

Duration: 5 Days
Registration Open Now!

Video Learning

Duration: 5 Days
Registration Open Now!

What you will learn

Java SE 11 Programmer I

  • Chapter 1 Welcome to Java 1
  • Chapter 2 Java Building Blocks 35
  • Chapter 3 Operators 79
  • Chapter 4 Making Decisions 113
  • Chapter 5 Core Java APIs 161
  • Chapter 6 Lambdas and Functional Interfaces 221
  • Chapter 7 Methods and Encapsulation 247
  • Chapter 8 Class Design 295
  • Chapter 9 Advanced Class Design 363
  • Chapter 10 Exceptions 401
  • Chapter 11 Modules 451
  • Appendix Answers to Review Questions 491

Java Programmer 2

  • Chapter 1 Java Fundamentals 1
  • Chapter 2 Annotations 59
  • Chapter 3 Generics and Collections 105
  • Chapter 4 Functional Programming 175
  • Chapter 5 Exceptions, Assertions, and Localization 247
  • Chapter 6 Modular Applications 309
  • Chapter 7 Concurrency 345
  • Chapter 8 I/O 419
  • Chapter 9 NIO.2 475
  • Chapter 10 JDBC 529
  • Chapter 11 Security 575
  • Appendices 611Appendix A The Upgrade Exam 611

Basic computer skills

Introduction to Computer Programming

FULL COURSE OUTLINE

TABLE OF CONTENTS

Introduction xxi

The Assessment Test xliii

Chapter 1 Welcome to Java 1

Learning About the Java Environment 2

Major Components of Java 2

Downloading a JDK 3

Identifying Benefits of Java 4

Understanding the Java Class Structure 5

Fields and Methods 5

Comments 6

Classes vs. Files 8

Writing a main() Method 8

Creating a main() Method 9

Passing Parameters to a Java Program 10

Running a Program in One Line 12

Understanding Package Declarations and Imports 13

Wildcards 15

Redundant Imports 15

Naming Conflicts 16

Creating a New Package 18

Compiling and Running Code with Packages 19

Using an Alternate Directory 20

Compiling with JAR Files 22

Creating a JAR File 23

Running a Program in One Line with Packages 24

Ordering Elements in a Class 24

Code Formatting on the Exam 26

Summary 27

Exam Essentials 27

Review Questions 29

Chapter 2 Java Building Blocks 35

Creating Objects 36

Calling Constructors 36

Reading and Writing Member Fields 37

Executing Instance Initializer Blocks 38

Following Order of Initialization 39

Understanding Data Types 40

Using Primitive Types 40

Using Reference Types 44

Distinguishing between Primitives and Reference Types 45

Declaring Variables 46

Identifying Identifiers 46

Declaring Multiple Variables 49

Initializing Variables 50

Creating Local Variables 51

Passing Constructor and Method Parameters 52

Defining Instance and Class Variables 53

Introducing var 53

Managing Variable Scope 59

Limiting Scope 59

Nesting Scope 60

Tracing Scope 60

Applying Scope to Classes 61

Reviewing Scope 62

Destroying Objects 62

Understanding Garbage Collection 63

Tracing Eligibility 64

Summary 67

Exam Essentials 67

Review Questions 69

Chapter 3 Operators 79

Understanding Java Operators 80

Types of Operators 80

Operator Precedence 81

Applying Unary Operators 82

Logical Complement and Negation Operators 83

Increment and Decrement Operators 84

Working with Binary Arithmetic Operators 85

Arithmetic Operators 86

Numeric Promotion 88

Assigning Values 90

Assignment Operator 90

Casting Values 90

Compound Assignment Operators 93

Assignment Operator Return Value 94

Comparing Values 95

Equality Operators 95

Relational Operators 97

Logical Operators 99

Short-Circuit Operators 100

Making Decisions with the Ternary Operator 102

Summary 103

Exam Essentials 104

Review Questions 105

Chapter 4 Making Decisions 113

Creating Decision-Making Statements 114

Statements and Blocks 114

The if Statement 115

The else Statement 116

The switch Statement 119

Writing while Loops 126

The while Statement 126

The do/while Statement 127

Comparing while and do/while Loops 128

Infinite Loops 129

Constructing for Loops 130

The for Loop 131

The for-each Loop 136

Controlling Flow with Branching 141

Nested Loops 141

Adding Optional Labels 142

The break Statement 143

The continue Statement 145

The return Statement 147

Unreachable Code 148

Reviewing Branching 148

Summary 149

Exam Essentials 150

Review Questions 151

Chapter 5 Core Java APIs 161

Creating and Manipulating Strings 162

Concatenation 163

Immutability 164

Important String Methods 165

Method Chaining 171

Using the StringBuilder Class 172

Mutability and Chaining 173

Creating a StringBuilder 174

Important StringBuilder Methods 174

Understanding Equality 177

Comparing equals() and == 177

The String Pool 179

Understanding Java Arrays 180

Creating an Array of Primitives 181

Creating an Array with Reference Variables 183

Using an Array 185

Sorting 186

Searching 187

Comparing 188

Varargs 190

Multidimensional Arrays 190

Understanding an ArrayList 193

Creating an ArrayList 193

Using an ArrayList 195

Wrapper Classes 199

Autoboxing and Unboxing 201

Converting Between array and List 201

Using Varargs to Create a List 203

Sorting 204

Creating Sets and Maps 204

Introducing Sets 204

Introducing Maps 205

Calculating with Math APIs 206

min() and max() 206

round() 207

pow() 207

random() 208

Summary 208

Exam Essentials 209

Review Questions 210

Chapter 6 Lambdas and Functional Interfaces 221

Writing Simple Lambdas 222

Lambda Example 222

Lambda Syntax 225

Introducing Functional Interfaces 227

Predicate 228

Consumer 228

Supplier 229

Comparator 230

Working with Variables in Lambdas 231

Parameter List 231

Local Variables inside the Lambda Body 231

Variables Referenced from the Lambda Body 232

Calling APIs with Lambdas 234

removeIf() 234

sort() 235

forEach() 235

Summary 236

Exam Essentials 237

Review Questions 238

Chapter 7 Methods and Encapsulation 247

Designing Methods 248

Access Modifiers 249

Optional Specifiers 250

Return Type 251

Method Name 252

Parameter List 253

Optional Exception List 253

Method Body 254

Working with Varargs 254

Applying Access Modifiers 256

Private Access 256

Default (Package-Private) Access 257

Protected Access 259

Public Access 263

Applying the static Keyword 264

Designing static Methods and Fields 264

Accessing a static Variable or Method 265

Static vs. Instance 266

static Variables 268

Static Initialization 269

Static Imports 270

Passing Data among Methods 272

Overloading Methods 275

Varargs 277

Autoboxing 277

Reference Types 277

Primitives 279

Generics 279

Arrays 280

Putting It All Together 280

Encapsulating Data 281

Summary 283

Exam Essentials 284

Review Questions 285

Chapter 8 Class Design 295

Understanding Inheritance 296

Single vs. Multiple Inheritance 297

Inheriting Object 298

Creating Classes 299

Extending a Class 299

Applying Class Access Modifiers 301

Accessing the this Reference 302

Calling the super Reference 303

Declaring Constructors 305

Creating a Constructor 305

Default Constructor 306

Calling Overloaded Constructors with this() 308

Calling Parent Constructors with super() 310

Constructors and final Fields 314

Order of Initialization 316

Reviewing Constructor Rules 322

Inheriting Members 323

Calling Inherited Members 323

Inheriting Methods 324

Hiding Variables 336

Understanding Polymorphism 337

Object vs. Reference 339

Casting Objects 340

The instanceof Operator 341

Polymorphism and Method Overriding 342

Overriding vs. Hiding Members 344

Summary 346

Exam Essentials 347

Review Questions 349

Chapter 9 Advanced Class Design 363

Creating Abstract Classes 364

Introducing Abstract Classes 364

Defining Abstract Methods 366

Creating a Concrete Class 370

Reviewing Abstract Class Rules 372

Implementing Interfaces 373

Defining an Interface 373

Inserting Implicit Modifiers 377

Inheriting an Interface 380

Polymorphism and Interfaces 384

Reviewing Interface Rules 386

Introducing Inner Classes 388

Defining a Member Inner Class 388

Using a Member Inner Class 389

Summary 390

Exam Essentials 391

Review Questions 392

Chapter 10 Exceptions 401

Understanding Exceptions 402

The Role of Exceptions 402

Understanding Exception Types 404

Throwing an Exception 407

Recognizing Exception Classes 409

RuntimeException Classes 409

Checked Exception Classes 412

Error Classes 413

Handling Exceptions 414

Using try and catch Statements 414

Chaining catch Blocks 416

Applying a Multi-catch Block 418

Adding a finally Block 421

Finally Closing Resources 424

Throwing Additional Exceptions 430

Calling Methods That Throw Exceptions 432

Declaring and Overriding Methods with Exceptions 434

Printing an Exception 435

Summary 437

Exam Essentials 438

Review Questions 440

Chapter 11 Modules 451

Introducing Modules 452

Exploring a Module 453

Benefits of Modules 454

Creating and Running a Modular Program 456

Creating the Files 457

Compiling Our First Module 458

Running Our First Module 460

Packaging Our First Module 461

Updating Our Example for Multiple Modules 463

Updating the Feeding Module 463

Creating a Care Module 464

Creating the Talks Module 466

Creating the Staff Module 469

Diving into the module-info File 470

exports 470

requires transitive 472

providesuses, and opens 474

Discovering Modules 475

The java Command 475

The jar Command 478

The jdeps Command 478

The jmod Command 480

Reviewing Command-Line Options 481

Summary 483

Exam Essentials 484

Review Questions 485

Appendix Answers to Review Questions 491

Chapter 1: Welcome to Java 492

Chapter 2: Java Building Blocks 494

Chapter 3: Operators 498

Chapter 4: Making Decisions 501

Chapter 5: Core Java APIs 505

Chapter 6: Lambdas and Functional Interfaces 509

Chapter 7: Methods and Encapsulation 511

Chapter 8: Class Design 513

Chapter 9: Advanced Class Design 518

Chapter 10: Exceptions 522

Chapter 11: Modules 526

Index 529

TABLE OF CONTENTS

Introduction xxi

Assessment Test xliv

Chapter 1 Java Fundamentals 1

Applying the final Modifier 2

Declaring final Local Variables 3

Adding final to Instance and static Variables 4

Writing final Methods 5

Marking Classes final 5

Working with Enums 6

Creating Simple Enums 6

Using Enums in Switch Statements 8

Adding Constructors, Fields, and Methods 9

Creating Nested Classes 12

Declaring an Inner Class 12

Creating a static Nested Class 15

Writing a Local Class 17

Defining an Anonymous Class 18

Reviewing Nested Classes 21

Understanding Interface Members 22

Relying on a default Interface Method 23

Using static Interface Methods 27

Introducing private Interface Methods 28

Introducing private static Interface Methods 29

Reviewing Interface Members 31

Introducing Functional Programming 32

Defining a Functional Interface 32

Declaring a Functional Interface with Object Methods 34

Implementing Functional Interfaces with Lambdas 36

Writing Lambda Expressions 38

Working with Lambda Variables 40

Summary 43

Exam Essentials 44

Review Questions 46

Chapter 2 Annotations 59

Introducing Annotations 60

Understanding Metadata 60

Purpose of Annotations 61

Creating Custom Annotations 64

Creating an Annotation 64

Specifying a Required Element 65

Providing an Optional Element 66

Selecting an Element Type 67

Applying Element Modifiers 67

Adding a Constant Variable 68

Reviewing Annotation Rules 68

Applying Annotations 69

Using Annotations in Declarations 69

Mixing Required and Optional Elements 71

Creating a value() Element 71

Passing an Array of Values 73

Declaring Annotation-Specific Annotations 74

Limiting Usage with @Target 74

Storing Annotations with @Retention 77

Generating Javadoc with @Documented 77

Inheriting Annotations with @Inherited 79

Supporting Duplicates with @Repeatable 79

Reviewing Annotation-Specific Annotations 81

Using Common Annotations 83

Marking Methods with @Override 83

Declaring Interfaces with @FunctionalInterface 84

Retiring Code with @Deprecated 85

Ignoring Warnings with @SuppressWarnings 86

Protecting Arguments with @SafeVarargs 88

Reviewing Common Annotations 89

Summary 91

Exam Essentials 92

Review Questions 94

Chapter 3 Generics and Collections 105

Using Method References 107

Calling Static Methods 108

Calling Instance Methods on a Particular Object 109

Calling Instance Methods on a Parameter 109

Calling Constructors 110

Reviewing Method References 110

Using Wrapper Classes 111

Using the Diamond Operator 113

Using Lists, Sets, Maps, and Queues 114

Common Collections Methods 115

Using the List Interface 119

Using the Set Interface 124

Using the Queue Interface 126

Using the Map Interface 128

Comparing Collection Types 135

Sorting Data 137

Creating a Comparable Class 137

Comparing Data with a Comparator 141

Comparing Comparable and Comparator 142

Comparing Multiple Fields 143

Sorting and Searching 145

Working with Generics 147

Generic Classes 148

Generic Interfaces 151

Raw Types 152

Generic Methods 153

Bounding Generic Types 154

Putting It All Together 159

Summary 161

Exam Essentials 163

Review Questions 164

Chapter 4 Functional Programming 175

Working with Built-in Functional Interfaces 176

Implementing Supplier 178

Implementing Consumer and BiConsumer 179

Implementing Predicate and BiPredicate 180

Implementing Function and BiFunction 181

Implementing UnaryOperator and BinaryOperator 183

Checking Functional Interfaces 184

Convenience Methods on Functional Interfaces 185

Returning an Optional 187

Creating an Optional 188

Dealing with an Empty Optional 189

Using Streams 191

Understanding the Pipeline Flow 191

Creating Stream Sources 194

Using Common Terminal Operations 197

Using Common Intermediate Operations 204

Putting Together the Pipeline 209

Working with Primitive Streams 213

Creating Primitive Streams 214

Mapping Streams 217

Using Optional l with Primitive Streams 219

Summarizing Statistics 220

Learning the Functional Interfaces for Primitives 221

Working with Advanced Stream Pipeline Concepts 224

Linking Streams to the Underlying Data 224

Chaining Optionals 224

Collecting Results 227

Summary 234

Exam Essentials 236

Review Questions 238

Chapter 5 Exceptions, Assertions, and Localization 247

Reviewing Exceptions 248

Handling Exceptions 248

Distinguishing between throw and throws 250

Examining Exception Categories 250

Inheriting Exception Classes 252

Creating Custom Exceptions 253

Declaring Exception Classes 253

Adding Custom Constructors 253

Printing Stack Traces 255

Automating Resource Management 256

Constructing Try-With-Resources Statements 256

Learning the New Effectively Final Feature 259

Understanding Suppressed Exceptions 261

Declaring Assertions 264

Validating Data with the assert Statement 264

Enabling Assertions 266

Disabling Assertions 267

Applying Assertions 267

Writing Assertions Correctly 268

Working with Dates and Times 268

Creating Dates and Times 269

Formatting Dates and Times 271

Supporting Internationalization and Localization 276

Picking a Locale 276

Localizing Numbers 279

Localizing Dates 283

Specifying a Locale Category 284

Loading Properties with Resource Bundles 285

Creating a Resource Bundle 286

Picking a Resource Bundle 288

Selecting Resource Bundle Values 289

Formatting Messages 291

Using the Properties Class 292

Summary 293

Exam Essentials 294

Review Questions 295

Chapter 6 Modular Applications 309

Reviewing Module Directives 310

Comparing Types of Modules 311

Named Modules 311

Automatic Modules 312

Unnamed Modules 315

Comparing Module Types 315

Analyzing JDK Dependencies 316

Identifying Built-in Modules 316

Using jdeps 318

Migrating an Application 321

Determining the Order 321

Exploring a Bottom-Up Migration Strategy 322

Exploring a Top-Down Migration Strategy 324

Splitting a Big Project into Modules 325

Failing to Compile with a Cyclic Dependency 326

Creating a Service 328

Declaring the Service Provider Interface 329

Creating a Service Locator 330

Invoking from a Consumer 332

Adding a Service Provider 333

Merging Service Locator and Consumer 334

Reviewing Services 337

Summary 337

Exam Essentials 338

Review Questions 339

Chapter 7 Concurrency 345

Introducing Threads 347

Distinguishing Thread Types 348

Understanding Thread Concurrency 348

Defining a Task with Runnable 349

Creating a Thread 351

Polling with Sleep 353

Creating Threads with the Concurrency API 355

Introducing the Single-Thread Executor 355

Shutting Down a Thread Executor 356

Submitting Tasks 357

Waiting for Results 358

Submitting Task Collections 362

Scheduling Tasks 363

Increasing Concurrency with Pools 366

Writing Thread-Safe Code 367

Understanding Thread-Safety 367

Protecting Data with Atomic Classes 369

Improving Access with Synchronized Blocks 371

Synchronizing on Methods 373

Understanding the Lock Framework 375

Orchestrating Tasks with a CyclicBarrier 379

Using Concurrent Collections 382

Understanding Memory Consistency Errors 383

Working with Concurrent Classes 383

Obtaining Synchronized Collections 388

Identifying Threading Problems 389

Understanding Liveness 390

Managing Race Conditions 393

Working with Parallel Streams 394

Creating Parallel Streams 395

Performing a Parallel Decomposition 396

Processing Parallel Reductions 398

Avoiding Stateful Operations 403

Summary 404

Exam Essentials 405

Review Questions 406

Chapter 8 I/O 419

Understanding Files and Directories 420

Conceptualizing the File System 420

Storing Data as Bytes 422

Introducing the File Class 422

Introducing I/O Streams 426

Understanding I/O Stream Fundamentals 426

Learning I/O Stream Nomenclature 427

Common I/O Stream Operations 433

Reading and Writing Data 433

Closing the Stream 435

Manipulating Input Streams 436

Flushing Output Streams 438

Reviewing Common I/O Stream Methods 439

Working with I/O Stream Classes 440

Reading and Writing Binary Data 440

Buffering Binary Data 441

Reading and Writing Character Data 443

Buffering Character Data 444

Serializing Data 445

Printing Data 452

Review of Stream Classes 457

Interacting with Users 458

Printing Data to the User 459

Reading Input as a Stream 460

Closing System Streams 460

Acquiring Input with Console 461

Summary 464

Exam Essentials 464

Review Questions 466

Chapter 9 NIO.2 475

Introducing NIO.2 476

Introducing Path 477

Creating Paths 478

Understanding Common NIO.2 Features 483

Interacting with Paths 486

Viewing the Path with toString(), getNameCount(), and getName() 486

Creating a New Path with subpath() 487

Accessing Path Elements with getFileName(), getParent(), and getRoot() 488

Checking Path Type with isAbsolute() and toAbsolutePath() 490

Joining Paths with resolve() 491

Deriving a Path with relativize() 491

Cleaning Up a Path with normalize() 493

Retrieving the File System Path with toRealPath() 493

Reviewing Path Methods 494

Operating on Files and Directories 495

Checking for Existence with exists() 495

Testing Uniqueness with isSameFile() 496

Making Directories with createDirectory() and createDirectories() 497

Copying Files with copy() 498

Moving or Renaming Paths with move() 500

Deleting a File with delete() and deleteIfExists() 500

Reading and Writing Data with newBufferedReader() and newBufferedWriter() 501

Reading a File with readAllLines() 502

Reviewing Files Methods 502

Managing File Attributes 503

Discovering File Attributes 503

Improving Attribute Access 506

Applying Functional Programming 508

Listing Directory Contents 508

Traversing a Directory Tree 510

Searching a Directory with find() 514

Reading a File with lines() 515

Comparing Legacy java.io.File and NIO.2 Methods 517

Summary 518

Exam Essentials 518

Review Questions 520

Chapter 10 JDBC 529

Introducing Relational Databases and SQL 530

Identifying the Structure of a Relational Database 532

Writing Basic SQL Statements 533

Introducing the Interfaces of JDBC 535

Connecting to a Database 537

Building a JDBC URL 537

Getting a Database Connection 539

Working with a PreparedStatement 542

Obtaining a PreparedStatement 543

Executing a PreparedStatement 543

Working with Parameters 546

Updating Multiple Times 549

Getting Data from a ResultSet 551

Reading a ResultSet 551

Getting Data for a Column 555

Using Bind Variables 556

Calling a CallableStatement 557

Calling a Procedure without Parameters 558

Passing an IN Parameter 559

Returning an OUT Parameter 559

Working with an INOUT Parameter 560

Comparing Callable Statement Parameters 560

Closing Database Resources 561

Summary 564

Exam Essentials 564

Review Questions 566

Chapter 11 Security 575

Designing a Secure Object 576

Limiting Accessibility 576

Restricting Extensibility 577

Creating Immutable Objects 578

Cloning Objects 581

Introducing Injection and Input Validation 583

Preventing Injection with a PreparedStatement 583

Invalidating Invalid Input with Validation 586

Working with Confidential Information 588

Guarding Sensitive Data from Output 589

Protecting Data in Memory 589

Limiting File Access 590

Serializing and Deserializing Objects 591

Specifying Which Fields to Serialize 591

Customizing the Serialization Process 592

Pre/Post-Serialization Processing 593

Reviewing Serialization Methods 596

Constructing Sensitive Objects 597

Making Methods final 598

Making Classes final 598

Making the Constructor private 599

Preventing Denial of Service Attacks 600

Leaking Resources 600

Reading Very Large Resources 600

Including Potentially Large Resources 601

Overflowing Numbers 601

Wasting Data Structures 602

Summary 603

Exam Essentials 604

Review Questions 605

Appendices 611

Appendix A The Upgrade Exam 611

Working with Local Variable Type Inference 612

Type Inference of var 613

Examples with var 614

Review of var Rules 617

Introducing Modules 617

Exploring a Module 618

Benefits of Modules 619

Creating and Running a Modular Program 621

Creating the Files 622

Compiling Our First Module 623

Running Our First Module 625

Packaging Our First Module 627

Updating Our Example for Multiple Modules 628

Updating the Feeding Module 628

Creating a Care Module 629

Creating the Talks Module 631

Creating the Staff Module 634

Diving into the module-info File 635

exports 635

requires transitive 636

provides, uses, and opens 639

Discovering Modules 639

The java Command 639

The jar Command 643

The jdeps Command 643

The jmod Command 645

Reviewing Command-Line Options 645

Summary 648

Exam Essentials 649

Review Questions 650

Appendix B Answers to Review Questions 657

Chapter 1: Java Fundamentals 658

Chapter 2: Annotations 662

Chapter 3: Generics and Collections 665

Chapter 4: Functional Programming 669

Chapter 5: Exceptions, Assertions, and Localization 672

Chapter 6: Modular Applications 676

Chapter 7: Concurrency 678

Chapter 8: I/O 682

Chapter 9: NIO.2 685

Chapter 10: JDBC 689

Chapter 11: Security 691

Appendix A: The Upgrade Exam 693

Index 697

Join Over 10,000 Students that have studied with MasterGrade IT Now

Become Part of MasterGrade IT to Further Your Career.