Java OCP I Training Course

Learn the fundamentals of Java, and how to apply your Java knowledge

Pre-requisites

Our Intro To Programming level is required for entry into this course

Who will benefit

  • Any programmer at the right level that wants to start learn Java the right way with a goal to also prepare for the Java Certification Exam OCP I
  • This course is a pre-requisite for the Java OCP II Training Course
  • Certification

    Attendance : If you have attended 80% of the sessions and completed all the class work, you qualify for the Attendance Certificate. Competency : If you have also completed all the practical projects as described the Outcomes section, you qualify for the Competency Certificate.

    What you will learn

    • Know the Fundamentals of HTML, CSS, JavaScript and how they work together to build apps.
    • Know how to debug JavaScript programs in the browser.
    • Know how to use data structures, control flow to build 5-10 useful small apps combining HTML, CSS and JavaScript.
    • Have enough JavaScript knowledge to pass a recognised international JavaScript Quiz.
    • Build an HTML Web Site showing off your portfolio of projects and host it online.

    What do I need?

    Live Online Training : A laptop, and a stable internet connection. The recommended minimum speed is around 10 Mbps. Classroom Training : A laptop, please notify us if you are not brining your own laptop. Please see the calendar below for the schedule

    Day One1,2,3,4

    1 Introduction

    • Audience 
    • Introductions 
    • Course Objectives 
    • Schedule 
    • Lesson Format 
    • Course Environment 
    • How Do You Learn More After the Course? 
    • Additional Resources 
    • Summary 

    2 What Is a Java Program?

    • Objectives 
    • Topics 
    • Purpose of a Computer Program 
    • Translating High-Level Code to Machine Code 
    • Linked to Platform-Specific Libraries 
    • Platform-Dependent Programs 
    • Topics 
    • Key Features of the Java Language 
    • Java Is Platform-Independent 
    • Java Programs Run In a Java Virtual Machine 
    • Procedural Programming Languages 
    • Java Is an Object-Oriented Language 
    • Topics 
    • Verifying the Java Development Environment 
    • Examining the Installed JDK: The Tools
    • Topics 
    • Compiling and Running a Java Program 
    • Compiling a Program 
    • Executing (Testing) a Program 
    • Output for a Java Program 
    • Exercise 2-1 
    • JDK 11: Launch Single-File Source-Code Programs 
    • Exercise 2-2 

    3 Creating a Java Main Class

    • Objectives 
    • Topics 
    • Java Classes 
    • Program Structure 
    • Java Packages 
    • Java IDEs 
    • The NetBeans IDE 
    • Creating a Java Project 
    • Creating a Java Class 
    • Exercise 3-1:Creating a New Project and Java Class 
    • Opening an Existing Java Project 
    • Creating a New Java Package 
    • Topics 
    • The main Method 
    • A main Class Example
    • Output to the Console 
    • Avoiding Syntax Errors
    • Compiling and Running a Program by Using NetBeans 
    • Exercise 3-2: Creating a main Method 

    4 Data in a Cart

    • Objectives 
    • Topics 
    • Variables 
    • Variable Types 
    • Naming a Variable
    • Java SE 9: The Underscore Character Is Not a Legal Name 
    • Uses of Variables 
    • Topics 
    • Examples: Variable Declaration and Initialization 
    • String Concatenation 
    • Exercise 4-1: Using String Variables 
    • Quiz 
    • Topics 
    • int and double Values
    • Initializing and Assigning Numeric Values 
    • Topics 
    • Standard Mathematical Operators 
    • Increment and Decrement Operators (++ and --) 
    • Operator Precedence 
    • Using Parentheses 
    • Exercise 4-2: Using and Manipulating Numbers 

    Day Two5.6.7.8

    5 Managing Multiple Items

    • Objectives
    • Topics 
    • Making Decisions 
    • The if/else Statement 
    • Boolean Expressions 
    • Relational Operators 
    • Examples 
    • Exercise 5-1: Using if Statements 
    • Quiz 
    • Topics 
    • What If There Are Multiple Items in the Shopping Cart? 
    • Introduction to Arrays 
    • Array Examples 
    • Array Indices and Length 
    • Declaring and Initializing an Array 
    • Accessing Array Elements 
    • Exercise 5-2: Using an Array 
    • Quiz 
    • Topics 
    • Loops 
    • Processing a String Array 
    • Using break with Loops 
    • Exercise 5-3: Using a Loop to Process an Array 

    6 Describing Objects and Classes

    • Interactive Quizzes 
    • Objectives 
    • Topics 
    • Object-Oriented Programming 
    • Duke’s Choice Order Process 
    • Characteristics of Objects 
    • Classes and Instances 
    • Quiz 
    • Topics 
    • The Customer Properties and Behaviors 
    • The Components of a Class 
    • Modeling Properties and Behaviors 
    • Exercise 6-1: Creating the Item Class 
    • Topics 
    • Customer Instances 
    • Object Instances and Instantiation Syntax 
    • The Dot (.) Operator 
    • Objects with Another Object as a Property 
    • Quiz 
    • Topics 
    • Accessing Objects by Using a Reference 
    • Working with Object References 
    • References to Different Objects 
    • References and Objects in Memory 
    • Assigning a Reference to Another Reference 
    • Two References, One Object 
    • Exercise 6-2: Modifying the ShoppingCart to Use Item Fields 
    • Topics 
    • Arrays Are Objects 
    • Declaring, Instantiating, and Initializing Arrays 
    • Storing Arrays in Memory 
    • Storing Arrays of Object References in Memory
    • Topics 
    • Soccer Application 
    • Creating the Soccer Application 
    • Soccer Web Application 
    • Summary 
    • Practices Overview 

    7 Manipulating and Formatting the Data in Your Program

    • Objectives 
    • Topics 
    • String Class 
    • Concatenating Strings 
    • String Method Calls with Primitive Return Values 
    • String Method Calls with Object Return Values 
    • Topics 
    • Java API Documentation 
    • JDK 11 API Documentation 
    • Java Platform SE and JDK Version 11 API Specification 
    • Java Platform SE 11: Method Summary 
    • Java Platform SE 11: Method Detail 
    • indexOf Method Example 
    • Exercise 7-1: Use indexOf and substring Methods 
    • Topics 
    • StringBuilder Class
    • StringBuilder Advantages over String for Concatenation (or Appending) 
    • StringBuilder: Declare and Instantiate 
    • StringBuilder Append 
    • Quiz 
    • Exercise 7-2: Instantiate the StringBuilder object 
    • Topics
    • Primitive Data Types 
    • Some New Integral Primitive Types 
    • Floating Point Primitive Types 
    • Textual Primitive Type 
    • Java Language Trivia: Unicode 
    • Constants 
    • Quiz 
    • Topics 
    • Modulus Operator 
    • Combining Operators to Make Assignments 
    • More on Increment and Decrement Operators 
    • Increment and Decrement Operators (++ and ––) 
    • Topics 
    • Promotion 
    • Caution with Promotion 
    • Type Casting 
    • Caution with Type Casting 
    • Using Promotion and Casting 
    • Compiler Assumptions for Integral and Floating Point Data Types 
    • Automatic Promotion 
    • Using a long 
    • Using Floating Points 
    • Floating Point Data Types and Assignment 
    • Quiz 
    • Exercise 7-3: Declare a long, float, and char 
    • Summary 
    • Practices Overview 

    8 Creating and Using Methods

    • Objectives 8-2
    • Topics 8-3
    • Basic Form of a Method 8-4
    • Calling a Method from a Different Class 8-5
    • Caller and Worker Methods 8-6
    • A Constructor Method 
    • Writing and Calling a Constructor 
    • Calling a Method in the Same Class 
    • Topics 
    • Method Arguments and Parameters 
    • Method Parameter Examples 
    • Method Return Types 
    • Method Return Types Examples 
    • Method Return Animation 
    • Passing Arguments and Returning Values 
    • More Examples 
    • Code Without Methods 
    • Better Code with Methods 
    • Even Better Code with Methods 
    • Variable Scope 
    • Advantages of Using Methods 
    • Exercise 8-1: Declare a setColor Method 
    • Topics 
    • Static Methods and Variables 
    • Example: Setting the Size for a New Item 
    • Creating and Accessing Static Members 
    • When to Use Static Methods or Fields 
    • Some Rules About Static Fields and Methods 
    • Static Fields and Methods Versus Instance Fields and Methods 
    • Static Methods and Variables in the Java API 
    • Examining Static Variables in the JDK Libraries 
    • Using Static Variables and Methods: System.out.println 
    • More Static Fields and Methods in the Java API 
    • Converting Data Values 

    Day Three9.10.11

    9 Using Encapsulation

    • Interactive Quizzes 
    • Objectives 
    • Topics 
    • What Is Access Control? 
    • Access Modifiers 
    • Access from Another Class 
    • Passing an Object Reference 
    • What If There Is a New Object? 
    • A Shopping Cart Code Example 
    • Passing by Value 
    • Reassigning the Reference 
    • Passing by Value 
    • Topics 
    • Method Overloading 
    • Using Method Overloading 
    • Method Overloading and the Java API 
    • Exercise 8-2: Overload a setItemFields Method, Part 1
    • Exercise 8-2: Overload a setItemFields Method, Part 2 
    • Quiz 
    • Another Example 
    • Using Access Control on Methods
    • Topics 
    • Encapsulation 
    • Get and Set Methods 
    • Why Use Setter and Getter Methods? 
    • Setter Method with Checking 
    • Using Setter and Getter Methods 
    • Exercise 9-1: Encapsulate a Class 
    • Topics 
    • Initializing a Shirt Object 
    • Constructors 
    • Shirt Constructor with Arguments 
    • Default Constructor and Constructor with Args 
    • Overloading Constructors 
    • Quiz 
    • Exercise 9-2: Create an Overloaded Constructor 

    10 More on Conditionals

    • Objectives 
    • Topics 
    • Review: Relational Operators 
    • Testing Equality Between String variables 
    • Common Conditional Operators 
    • Ternary Conditional Operator 
    • Using the Ternary Operator 
    • Exercise 10-1: Using the Ternary Operator 
    • Topics 
    • Handling Complex Conditions with a Chained if Construct 
    • Determining the Number of Days in a Month 
    • Chaining if/else Constructs 
    • Exercise 10-2: Chaining if Statements 
    • Topics 
    • Handling Complex Conditions with a switch Statement 
    • Coding Complex Conditions: switch 
    • switch Statement Syntax 
    • When to Use switch Constructs 
    • Exercise 10-3: Using switch Construct 

    11 Working with Arrays, Loops, and Dates

    • Objectives 
    • Topics 
    • Displaying a Date 
    • Class Names and the Import Statement 
    • Working with Dates 
    • Working with Different Calendars 
    • Some Methods of LocalDate 
    • Topics 
    • Working with an IDE Debugger 
    • Debugger Basics 
    • Setting Breakpoints 
    • The Debug Toolbar 
    • Viewing Variables 
    • Formatting Dates 
    • Exercise 11-1: Declare a LocalDateTime Object 
    • Topics 
    • Using the args Array in the main Method 
    • Converting String Arguments to Other Types 
    • Pass Arguments to the args Array in NetBeans 
    • Exercise 11-2: Parsing the args Array 
    • Topics 
    • Describing Two-Dimensional Arrays 
    • Declaring a Two-Dimensional Array 
    • Instantiating a Two-Dimensional Array 
    • Initializing a Two-Dimensional Array 
    • Quiz 
    • Topics 
    • Some New Types of Loops 
    • Repeating Behavior 
    • Coding a while Loop 
    • A while Loop Example 
    • while Loop with Counter 
    • Coding a Standard for Loop 
    • Standard for Loop Compared to a while loop 
    • Standard for Loop Compared to an Enhanced for Loop 
    • do/while Loop to Find the Factorial Value of a Number 
    • Coding a do/while Loop 
    • Comparing Loop Constructs 
    • The continue Keyword 
    • Exercise 11-3: Processing an Array of Items 
    • Topics 
    • Nesting Loops 
    • Nested for Loop 
    • Nested while Loop 
    • Processing a Two-Dimensional Array 
    • Output from Previous Example 
    • Quiz 
    • Topics 
    • ArrayList Class 
    • Benefits of the ArrayList Class 
    • Importing and Declaring an ArrayList
    • Working with an ArrayList 
    • Exercise 11-4: Working with an ArrayList 

    Day Four12.13.14

    12 Using Inheritance

    • Interactive Quizzes 
    • Objectives 
    • Duke’s Choice Classes: Common Behaviors 
    • Code Duplication 
    • Inheritance 
    • Inheritance Terminology 
    • Topics 
    • Implementing Inheritance 
    • More Inheritance Facts 
    • Clothing Class: Part 1 
    • Shirt Class: Part 1 
    • Constructor Calls with Inheritance 
    • Inheritance and Overloaded Constructors 
    • Exercise 12-1: Creating a Subclass, Part 1 
    • Exercise 12-1: Creating a Subclass, Part 2 
    • Topics 
    • More on Access Control 
    • Overriding Methods 
    • Review: Duke’s Choice Class Hierarchy 
    • Clothing Class: Part 2 
    • Shirt Class: Part 2 
    • Overriding a Method: What Happens at Run Time? 
    • Exercise 12-2: Overriding a Method in the Superclass 
    • Topics 
    • Polymorphism 
    • Superclass and Subclass Relationships 
    • Using the Superclass as a Reference 
    • Polymorphism Applied 
    • Accessing Methods Using a Superclass Reference 
    • Casting the Reference Type 
    • instanceof Operator 
    • Exercise 12-3: Using the instanceof Operator, Part 1
    • Exercise 12-3: Using the instanceof Operator, Part 2 
    • Topics 
    • Abstract Classes 
    • Extending Abstract Classes

    13 Using Interfaces

    • Objectives 
    • Topics 
    • The Object Class 
    • Calling the toString Method 
    • Overriding toString in Your Classes 
    • Topics 
    • The Multiple Inheritance Dilemma 
    • The Java Interface 
    • No Multiple Inheritance of State 
    • Multiple Hierarchies with Overlapping Requirements 
    • Using Interfaces in Your Application 
    • Implementing the Returnable Interface 
    • Access to Object Methods from Interface 
    • Casting an Interface Reference 
    • Quiz 
    • Topics 
    • What is This Feature? 
    • Benefits 
    • Where Can it be Used? 
    • Why is The Scope So Narrow? 
    • Exercise 13-1: Local Variable Type Inference 
    • Topics 
    • The Collections Framework
    • ArrayList Example
    • List Interface 
    • Example: Arrays.asList 
    • Exercise 13-2: Converting an Array to an ArrayList, Part 1
    • Exercise 13-2: Converting an Array to an ArrayList, Part 2 
    • Topics 
    • Example: Modifying a List of Names 
    • Using a Lambda Expression with replaceAll 
    • Lambda Expressions 
    • The Enhanced APIs That Use Lambda
    • Lambda Types 
    • The UnaryOperator Lambda Type
    • The Predicate Lambda Type 
    • Exercise 13-3: Using a Predicate Lambda Expression 

    14 Handling Exceptions

    • Objectives 
    • Topics 
    • What Are Exceptions?
    • Examples of Exceptions 
    • Code Example 
    • Another Example 
    • Types of Throwable classes 
    • Error Example: OutOfMemoryError 
    • Quiz
    • Topics 
    • Normal Program Execution: The Call Stack
    • How Exceptions Are Thrown
    • Topics 
    • Working with Exceptions in NetBeans
    • The try/catch Block 
    • Program Flow When an Exception Is Caught
    • When an Exception Is Thrown
    • Throwing Throwable Objects
    • Uncaught Exception 
    • Exception Printed to Console 
    • Summary of Exception Types 
    • Exercise 14-1: Catching an Exception 
    • Quiz 
    • Exceptions in the Java API Documentation
    • Calling a Method That Throws an Exception
    • Working with a Checked Exception 
    • Bad Practices 
    • Somewhat Better Practice 
    • Topics 
    • Multiple Exceptions 
    • Catching IOException 
    • Catching IllegalArgumentException 
    • Catching Remaining Exceptions 
    • Summary 
    • Practices Overview 

    Day Five15.16.17

    15 Deploying and Maintaining the Soccer Application

  • Interactive Quizzes 
  • Objectives 
  • Topics 
  • Packages 
  • Packages Directory Structure
  • Packages in NetBeans 
  • Packages in Source Code
  • Topics 
  • SoccerEnhanced.jar 
  • Set Main Class of Project 
  • Creating the JAR File with NetBeans 
  • Topics 
  • Client/Server Two-Tier Architecture
  • Client Server Three-Tier Architecture 
  • Topics 
  • Client/Server Three-Tier Architecture 
  • Different Outputs 
  • The Soccer Application
  • IDisplayDataItem Interface 
  • Running the JAR File from the Command Line 
  • Text Presentation of the League
  • Web Presentation of the League
  • Topics 
  • Enhancing the Application 
  • Adding a New GameEvent Kickoff
  • Game Record Including Kickoff 
  • Summary 
  • 16 Understanding Modules

    • Objectives 
    • Topics 
    • Reusing Code in Java: Classes 
    • Reusing Code in Java: Packages 
    • Reusing Code in Java: Programming in the Large 
    • What Is a Module? 
    • Example: java.base Module 
    • Module System 
    • Modular Development in JDK 9 
    • Topics 
    • JARs 
    • JAR Files and Distribution Issues 
    • Class Path Problems 
    • Example JAR Duplicate Class Problem 1
    • Example JAR Duplicate Class Problem 2 
    • Module System: Advantages 
    • Accessibility Between Classes 
    • Access Across Non-Modular JARs 
    • Access Across Modules 
    • Topics 
    • module-info.java 
    • Example: module-info.java 
    • Creating a Modular Project 
    • exports Module Directive 
    • exports…to Module Directive 
    • requires Module Directive 
    • requires transitive Module Directive 
    • Implementing a Requires Transitively Relationship 
    • Summary of Keywords 
    • Compiling Modules
    • Running a Modular Application 
    • Topics 
    • The JDK 
    • The Modular JDK 
    • Listing the Modules in JDK 9 
    • Java SE Modules 
    • The Base Module 

    17 JShell

    • Objectives 
    • Topics 
    • A Million Test Classes and Main Methods 
    • JShell Provides a Solution 
    • Topics 
    • Comparing Normal Execution with REPL 
    • Getting Started with JShell and REPL 
    • Scratch Variables 
    • Declaring Traditional Variables 
    • Code Snippets 
    • Completing a Code Snippet 
    • Tab Completion and Tab Tips 
    • Semicolons 
    • JShell Commands 
    • Importing Packages 
    • Quiz 
    • Topics 
    • Why Incorporate JShell in an IDE? 
    • Use Cases 
    • Two Ways to Open JShell in NetBeans 
    Back to top