dc dotCreds
Reference guide

Oracle Java SE 17 Developer Course Notes

Study Oracle Java SE 17 Developer section notes, then jump straight into the guided course or related practice questions without losing your place.

Continue CourseStart PracticePDF downloads available in Pro.
Checking access

Checking Pro access...

Looking for your active Pro access before showing Course Notes. This usually takes just a moment.

Course Notes preview

Unlock Pro for the full per-exam reference guide.

Preview one piece from each section. Pro includes every Course Notes section, summary, key point, common mistake, exam tip, related-question review, and PDF export.

Includes full Course Mode and Course Notes.

Section 1Java types, objects, and object-oriented designPreview
More in this section
  • 16 more key points in Pro version
  • 11 more common mistakes in Pro version
  • 7 more exam tips in Pro version
  • 27 more related questions in Pro version

Summary

Java performs compile-time type checking and conversions. Primitive and reference types have distinct conversion rules. Java: Classes, Interfaces, Inheritance, Polymorphism Records: Transparent data carriers with implicit finality and generated methods. Method overloading uses the same name for methods with different parameter lists. Override requires identical method signatures. Access modifiers control visibility. Nested types and sealed classes are core Java features impacting type checking and inheritance.

Key Points

  • Conversion rules are defined in the Java Language Specification.

Common Mistakes

  • Confusing implicit and explicit conversions.

Exam Tips

  • Review the specific conversion rules for primitive and reference types.
Section 2Collections, generics, and functional programmingPreview
More in this section
  • 17 more key points in Pro version
  • 10 more common mistakes in Pro version
  • 5 more exam tips in Pro version
  • 27 more related questions in Pro version

Summary

Collection selection: Order, Uniqueness, Lookup, Mutability, Concurrency. Generic bounds and wildcards provide type safety and flexibility in Java generics. Sorting collections using `Comparable` or `Comparator`. Generics and type bounds for safe sorting. Lambdas capture variables from their scope. Capture is formal (parameters) or variable (local). Immutability and collection factories are key to building robust and concurrent Java applications.

Key Points

  • List: Positional order, duplicates allowed.

Common Mistakes

  • Assuming all collections are interchangeable. The choice depends on the specific requirements.

Exam Tips

  • Consider the primary operation: Add, Remove, Lookup.
Section 3Streams and parallel processingPreview
More in this section
  • 17 more key points in Pro version
  • 12 more common mistakes in Pro version
  • 7 more exam tips in Pro version
  • 22 more related questions in Pro version

Summary

Stream pipelines are single-use data flows. Parallel pipelines must be independent. Collection choice drives pipeline behavior. Streams are consumed once; parallel pipelines need statelessness. Collection choice impacts ordering, uniqueness, and performance. Stream pipelines are single-use. Grouping uses List, Set, Queue, Map. Parallel pipelines need stateless operations. Optional results in streams mean consumption is final. Parallel pipelines need independent parameters. Collection choice drives performance and constraints. Parallel streams require careful design to avoid ordering and concurrency issues.

Key Points

  • Streams are consumed once.

Common Mistakes

  • Trying to reuse a stream after consumption.

Exam Tips

  • Focus on the pipeline's flow and the purpose of each stage.
Section 4Control flow, exceptions, and resource managementPreview
More in this section
  • 13 more key points in Pro version
  • 10 more common mistakes in Pro version
  • 4 more exam tips in Pro version
  • 17 more related questions in Pro version

Summary

Control flow: if, switch, for, while. Handles multiple exceptions with a single block. `try-with-resources` automatically closes resources, simplifying code and preventing leaks. Assertions and defensive validation are key to robust Java code.

Key Points

  • Switch expressions evaluate at compile time.

Common Mistakes

  • Confusing switch expressions with if statements.

Exam Tips

  • Focus on expression evaluation order.
Section 5Date, time, text, numbers, and localizationPreview
More in this section
  • 15 more key points in Pro version
  • 10 more common mistakes in Pro version
  • 5 more exam tips in Pro version
  • 17 more related questions in Pro version

Summary

Focus on `java.time` immutable types and chronology selection for accurate date/time calculations. Focus on `java.time` immutable types for date/time operations. Understand `java.time`'s immutable types and their specific semantics. Focus on selecting the correct `java.time` type based on precision needs. Immutable wrappers are preferred for data integrity. Focus on `java.time` immutable types and their semantic requirements.

Key Points

  • Use immutable date/time types to avoid unintended modifications.

Common Mistakes

  • Converting dates/times via strings introduces potential errors and bypasses the API's type safety.

Exam Tips

  • Verify the resulting type's precision, calendar, and time zone after arithmetic operations.
Section 6ConcurrencyPreview
More in this section
  • 15 more key points in Pro version
  • 10 more common mistakes in Pro version
  • 4 more exam tips in Pro version
  • 17 more related questions in Pro version

Summary

Thread safety requires controlling shared mutable state – visibility, atomicity, ordering, and resource management. Concurrency: Executors and Tasks Concurrent collections and atomic variables are key to managing shared mutable state safely in Java. Concurrency: Locks, Synchronization, Deadlock Parallel task coordination requires careful design to manage shared resources and prevent concurrency issues.

Key Points

  • Use locks/synchronizers for atomicity.

Common Mistakes

  • Assuming timing will solve concurrency issues – incorrect.

Exam Tips

  • Focus on the core principles of thread safety.
Section 7I/O and NIO.2Preview
More in this section
  • 18 more key points in Pro version
  • 12 more common mistakes in Pro version
  • 6 more exam tips in Pro version
  • 17 more related questions in Pro version

Summary

File I/O using Streams and Files. Focus on `Path` and `Files` classes for file manipulation. Traverse file trees using `Files.newDirectoryStream()`. Filter files with stream operations (e.g., `filter()`). Serialization constraints in I/O/NIO.2 relate to collection types and file operations. Safe and portable file handling with NIO.2 requires careful resource management and consideration of platform differences.

Key Points

  • Use `Files` for file operations.

Common Mistakes

  • Forgetting to close streams, leading to resource leaks.

Exam Tips

  • Focus on the core concepts of file I/O and collection selection.
Section 8Modules, packaging, and deploymentPreview
More in this section
  • 13 more key points in Pro version
  • 8 more common mistakes in Pro version
  • 5 more exam tips in Pro version
  • 12 more related questions in Pro version

Summary

Declare modules and their dependencies – a foundational step. Exports control public access; opens enable reflection. Focus on module descriptor configuration, package exports/opens, and service loading. Collection type selection is key – align with ordering, uniqueness, and performance. Module descriptors manage service dependencies. Exports for compile-time access, opens for runtime reflection. Collection choice based on ordering, uniqueness, lookup, etc. Modular application development involves defining module requirements and managing dependencies.

Key Points

  • Module descriptors define module metadata.

Common Mistakes

  • Confusing exports and opens – remember their distinct purposes.

Exam Tips

  • Focus on the purpose of each module descriptor element.
Section 9JDBC database accessPreview
More in this section
  • 13 more key points in Pro version
  • 9 more common mistakes in Pro version
  • 4 more exam tips in Pro version
  • 7 more related questions in Pro version

Summary

Connect to the database using JDBC. Execute SQL statements to retrieve or modify data. Prepared statements separate SQL from data, improving security and performance. JDBC: Navigate and update database results. Manage JDBC transactions and resources effectively for data integrity and performance.

Key Points

  • Use connections, statements, or prepared statements.

Common Mistakes

  • Incorrectly establishing the JDBC connection.

Exam Tips

  • Focus on the connection and statement execution process.
Section 10Java SE 17 language features and API reasoningPreview
More in this section
  • 14 more key points in Pro version
  • 7 more common mistakes in Pro version
  • 4 more exam tips in Pro version
  • 7 more related questions in Pro version

Summary

Apply `instanceof` with pattern matching for type checking. Records: Immutable data classes. Sealed Types: Restrict inheritance. Collections: List, Set, Queue, Map – choose wisely. Sealed classes restrict inheritance to improve API stability. Java 17: Permanent features vs. Preview features.

Key Points

  • `instanceof` checks for subtypes, not just the exact class.

Common Mistakes

  • Confusing `instanceof` with `==` (value comparison).

Exam Tips

  • Focus on the inheritance hierarchy when using `instanceof`.