GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - caseythecoder90/java-ocp-17-study: šŸ“š Comprehensive study guide for Oracle Certified Professional Java SE 17 Developer (1Z0-829) exam. 100+ documented examples covering all exam topics with working code, exam traps, and quick reference guides.

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.idea
.idea
 
 
lib
lib
 
 
src
src
 
 
.gitignore
.gitignore
 
 
JDBC_SETUP.md
JDBC_SETUP.md
 
 
JavaOCP17.iml
JavaOCP17.iml
 
 
PROJECT_STRUCTURE.md
PROJECT_STRUCTURE.md
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
init-db.sql
init-db.sql
 
 
pom.xml
pom.xml
 
 
stored-procedures.sql
stored-procedures.sql
 
 

Repository files navigation

Java OCP 17 Study Guide

A comprehensive study repository for the Oracle Certified Professional: Java SE 17 Developer (1Z0-829) exam. This repository contains well-documented code examples, exam tips, common traps, and practical demonstrations for every topic covered in the OCP Java 17 certification.

šŸ“š Why This Repository?

  • Exam-Focused: Every example is designed with the exam in mind, highlighting common traps and edge cases
  • Comprehensive Coverage: All exam topics from the official Oracle study guide
  • Working Examples: All code compiles and runs, with output demonstrations
  • Clear Documentation: Extensive inline comments explaining concepts and exam tips
  • Quick Reference: Tables, comparisons, and checklists for rapid review
  • Best Practices: Follows Java 17 features and modern coding standards

šŸŽÆ Exam Topics Covered

Chapter 1: Building Blocks

Topics: Java basics, primitive types, text blocks, operators, and fundamental concepts

  • Text blocks (Java 13+)
  • Variable declarations and initialization
  • Primitive types and wrapper classes
  • Identifier naming rules

Chapter 2: Operators

Topics: All Java operators and operator precedence

  • Arithmetic, relational, and logical operators
  • Operator precedence and associativity
  • Short-circuit evaluation
  • Ternary operator

Chapter 3: Control Flow

Topics: Decision structures and loops

  • if/else statements
  • switch statements (traditional and enhanced)
  • for, while, and do-while loops
  • break, continue, and return

Chapter 4: Core APIs

Topics: String, StringBuilder, Arrays, Math, and common APIs

  • String manipulation and immutability
  • StringBuilder vs StringBuffer
  • Array operations
  • Math class methods
  • Date/Time API basics

Chapter 5: Methods

Topics: Method declarations, overloading, varargs

  • Method signatures and return types
  • Method overloading rules
  • Varargs (variable arguments)
  • Access modifiers
  • Static vs instance methods

Chapter 6: Inheritance

Topics: Class inheritance, polymorphism, abstract classes

  • extends keyword and inheritance hierarchy
  • Method overriding vs overloading
  • Abstract classes and methods
  • Polymorphism and casting
  • Object class methods

Chapter 7: Beyond Classes

Topics: Interfaces, enums, nested classes, sealed classes

  • Interface declarations and implementation
  • Default and static methods in interfaces
  • Private methods in interfaces
  • Enums with constructors and methods
  • Inner classes (static nested, inner, local, anonymous)
  • Sealed classes (Java 17)

Chapter 8: Lambdas and Functional Interfaces

Topics: Lambda expressions, method references, built-in functional interfaces

  • Lambda syntax and rules
  • Functional interface definitions
  • Method references (4 types)
  • Built-in functional interfaces (Predicate, Consumer, Supplier, Function)
  • Effectively final variables
  • Lambda parameter syntax including var (Java 11+)

Chapter 9: Collections and Generics

Topics: Collection framework, generics, comparators

  • Files:
    • CollectionsFramework.java - Overview of List, Set, Queue, Map
    • ListMethods.java - List operations and methods
    • SetMethods.java - Set implementations and methods
    • MapMethods.java - Map operations and methods
    • QueueAndDequeMethods.java - Queue/Deque operations
    • ComparableAndComparator.java - Sorting and comparison
    • GenericsAndTypeErasure.java - Generic types and type erasure
    • BoundingGenericTypes.java - Bounded wildcards (upper/lower bounds)

Chapter 10: Streams

Topics: Stream API, intermediate and terminal operations

  • Stream creation and operations
  • map, filter, reduce, collect
  • Optional class
  • Primitive streams
  • Stream pipeline evaluation

Chapter 11: Exceptions and Localization

Topics: Exception handling, try-with-resources, localization

  • Checked vs unchecked exceptions
  • try-catch-finally blocks
  • try-with-resources (AutoCloseable)
  • Multi-catch blocks
  • Custom exceptions
  • Localization and resource bundles

Chapter 12: Modules

Topics: Java Platform Module System (JPMS)

  • Module declarations
  • exports and requires
  • Module types
  • Module path vs classpath
  • Service loading

Chapter 13: Concurrency

Topics: Threads, concurrency utilities, parallel streams

  • Thread creation and lifecycle
  • ExecutorService and thread pools
  • Concurrent collections
  • Atomic classes
  • Locks and synchronization
  • Parallel streams

Chapter 14: I/O

Topics: File I/O, NIO.2, serialization

  • Files:
    • FileAndPathBasics.java - File and Path fundamentals
    • FilesOperations.java - Files class operations
    • NIO2Options.java - LinkOption, StandardCopyOption, StandardOpenOption
    • Stream-based I/O
    • File operations and directory walking

Chapter 15: JDBC ⭐

Topics: Database connectivity, SQL operations, transactions

  • Complete implementation with 7 files and comprehensive documentation
  • Files:
    1. JDBCBasics.java - JDBC URL, DriverManager, Connection
    2. PreparedStatementExamples.java - Execute methods, binding variables
    3. ResultSetExamples.java - Cursor navigation, getters
    4. CallableStatementExamples.java - Stored procedures, IN/OUT/INOUT
    5. TransactionsAndSavepoints.java - Transactions, commit, rollback, savepoints
    6. ClosingResources.java - Proper closing order, cascading close
    7. JDBCExamReference.java - Quick reference guide

See: src/ch15jdbc/README.md for detailed setup and usage

Key Exam Points:

  • JDBC URL format: jdbc:subprotocol:subname
  • Execute methods: executeUpdate(), executeQuery(), execute()
  • 1-based indexing (NOT 0-based!)
  • ResultSet cursor starts BEFORE first row
  • Closing order: ResultSet → PreparedStatement → Connection
  • Cascading close behavior
  • Transaction control and savepoints

šŸ“‚ Repository Structure

JavaOCP17/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ ch01buildingblocks/
│   ā”œā”€ā”€ ch02operators/
│   ā”œā”€ā”€ ch03controlflow/
│   ā”œā”€ā”€ ch04coreapis/
│   ā”œā”€ā”€ ch05methods/
│   ā”œā”€ā”€ ch06inheritance/
│   ā”œā”€ā”€ ch07beyondclasses/
│   ā”œā”€ā”€ ch08lambdasandfunctionalinterfaces/
│   ā”œā”€ā”€ ch09collectionsandgenerics/
│   ā”œā”€ā”€ ch10streams/
│   ā”œā”€ā”€ ch11exceptionsandlocalization/
│   ā”œā”€ā”€ ch12modules/
│   ā”œā”€ā”€ ch13concurrency/
│   ā”œā”€ā”€ ch14io/
│   ā”œā”€ā”€ ch15jdbc/          # Complete JDBC implementation
│   │   ā”œā”€ā”€ README.md      # Detailed JDBC setup and examples
│   │   ā”œā”€ā”€ JDBCBasics.java
│   │   ā”œā”€ā”€ PreparedStatementExamples.java
│   │   ā”œā”€ā”€ ResultSetExamples.java
│   │   ā”œā”€ā”€ CallableStatementExamples.java
│   │   ā”œā”€ā”€ TransactionsAndSavepoints.java
│   │   ā”œā”€ā”€ ClosingResources.java
│   │   ā”œā”€ā”€ JDBCExamReference.java
│   │   ā”œā”€ā”€ stored-procedures.sql
│   │   └── setup-procedures.bat
│   └── ch16jdbc/          # Additional JDBC examples
ā”œā”€ā”€ lib/
│   └── postgresql-42.7.1.jar  # JDBC driver for examples
ā”œā”€ā”€ docker-compose.yml     # PostgreSQL database for JDBC
ā”œā”€ā”€ init-db.sql           # Database initialization
└── README.md             # This file

šŸš€ Getting Started

Prerequisites

  • Java 17 or higher
  • Docker (for JDBC chapter examples)
  • Git

Clone the Repository

git clone https://github.com/caseythecoder90/java-ocp-17-study.git
cd java-ocp-17-study

Compile Examples

# Compile all Java files
javac src/**/*.java

# Or compile specific chapter
javac src/ch09collectionsandgenerics/*.java

Run Examples

# Run a specific example
java -cp src ch09collectionsandgenerics.BoundingGenericTypes

# For JDBC examples (requires classpath with driver)
java -cp "src;lib/*" ch15jdbc.JDBCBasics

JDBC Setup (Chapter 15)

JDBC examples require PostgreSQL running in Docker:

# Start database
docker-compose up -d

# Setup stored procedures (one-time)
docker exec -i jdbc-practice-db psql -U ocpuser -d ocp_practice < src/ch15jdbc/stored-procedures.sql

# Run JDBC examples
java -cp "src;lib/*" ch15jdbc.JDBCBasics

See src/ch15jdbc/README.md for detailed instructions.

šŸ“– How to Use This Repository

For First-Time Learners

  1. Read the code: Each file has extensive documentation explaining concepts
  2. Run the examples: See the output and understand behavior
  3. Modify and experiment: Change values and see what happens
  4. Note the exam traps: Pay special attention to comments marked "EXAM TRAP!"

For Exam Review

  1. Focus on comparison tables: Each chapter has tables comparing similar concepts
  2. Review exam traps: All common pitfalls are documented
  3. Practice with edge cases: Examples include boundary conditions
  4. Use quick reference files: Files like JDBCExamReference.java for rapid review

Study Approach

  1. Week 1-2: Chapters 1-5 (Fundamentals)
  2. Week 3-4: Chapters 6-8 (OOP and Lambdas)
  3. Week 5-6: Chapters 9-11 (Collections, Streams, Exceptions)
  4. Week 7-8: Chapters 12-14 (Modules, Concurrency, I/O)
  5. Week 9-10: Chapter 15 (JDBC) + Practice Exams
  6. Week 11: Review all exam traps and edge cases

šŸŽ“ Exam Day Checklist

Must Memorize

  • JDBC URL format: jdbc:subprotocol:subname
  • Execute method return types
  • 1-based indexing in JDBC (NOT 0-based)
  • ResultSet cursor starts BEFORE first row
  • Resource closing order (reverse of creation)
  • AutoCloseable and try-with-resources
  • Functional interface method counts
  • Collection framework hierarchy
  • Stream operations (intermediate vs terminal)
  • Module system basics

Common Exam Traps

  • Confusing executeUpdate() with executeQuery()
  • Using index 0 for JDBC parameters/columns
  • Forgetting ResultSet cursor starts before first row
  • Wrong closing order for JDBC resources
  • Modifying effectively final variables in lambdas
  • Confusing method overloading vs overriding
  • Array vs Collection operations
  • Checked vs unchecked exceptions

šŸ” Key Features

Comprehensive Documentation

Every file includes:

  • Detailed inline comments explaining each concept
  • Comparison tables for similar methods/concepts
  • Common exam traps clearly marked
  • Edge cases and boundary conditions
  • Expected output for each example

Exam-Focused Examples

  • Real exam scenarios: Examples mirror actual exam question patterns
  • Edge cases: Boundary conditions and special cases covered
  • Common mistakes: What NOT to do, with explanations
  • Quick reference: Tables and summaries for rapid review

Working Code

  • All examples compile with Java 17
  • All examples produce output (not just syntax demonstrations)
  • JDBC examples use real database (PostgreSQL in Docker)
  • No external dependencies except JDBC driver

šŸ’” Tips for Success

  1. Don't just read, code: Type out examples yourself
  2. Understand the "why": Don't memorize, understand the reasoning
  3. Focus on exam traps: These are heavily tested
  4. Practice with real code: Run examples and modify them
  5. Use comparison tables: Great for quick review
  6. Review edge cases: Exam loves boundary conditions
  7. Time yourself: Practice answering questions quickly

šŸ“ What's NOT on the Exam

To help you focus, here's what you can skip:

  • SQL syntax errors (only JDBC API is tested)
  • Statement interface (only PreparedStatement and CallableStatement)
  • DataSource (only DriverManager)
  • Batch updates
  • Advanced concurrency patterns
  • Complex regex patterns
  • GUI development
  • Network programming

šŸ¤ Contributing

Found an error or want to add examples? Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -m 'Add improvement')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

Please ensure:

  • Code compiles with Java 17
  • Examples include comprehensive documentation
  • Exam traps are clearly marked
  • Output is demonstrated

šŸ“Š Repository Statistics

  • Total Java Files: 100+
  • Chapters Covered: 15/15 (100%)
  • Lines of Documentation: Thousands
  • Working Examples: All files compile and run
  • Exam Topics: Complete coverage

šŸ™ Acknowledgments

This repository was created as a comprehensive study guide for the Oracle Certified Professional Java SE 17 Developer exam. Examples and documentation are based on:

  • Oracle's official Java SE 17 documentation
  • OCP Java SE 17 Developer Study Guide
  • Real exam practice questions and feedback
  • Personal exam preparation experience

šŸ“œ License

This repository is for educational purposes. Feel free to use for your exam preparation.

šŸŽÆ Final Notes

Good luck on your exam! Remember:

  • Understand, don't memorize
  • Practice with working code
  • Focus on exam traps
  • Review comparison tables
  • Test edge cases
  • Time management is key

For JDBC examples, see the detailed guide in src/ch15jdbc/README.md.


⭐ If this repository helped you pass the exam, consider giving it a star!

Last Updated: January 2026 Exam: Oracle Certified Professional: Java SE 17 Developer (1Z0-829)

About

šŸ“š Comprehensive study guide for Oracle Certified Professional Java SE 17 Developer (1Z0-829) exam. 100+ documented examples covering all exam topics with working code, exam traps, and quick reference guides.

Topics

educationalexam-preparationjavajava-17java-certificationjdbcocp-certificationoracle-javaprogrammingstudy-guide

Resources

Readme
Activity

Stars

7 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.