Object-Oriented Programming with Java Course

Free online course · 11 lessons

Learn to program in Java from first programs to classes, collections, inheritance, interfaces, exceptions, unit tests, generics and streams. After the course you can design and build a medium-sized object-oriented program.

By Studeli

Start with lesson 1

What you will learn in 11 lessons

Every lesson includes all nine study tools

  • Study Guide
  • Summary
  • Walkthroughs
  • Practice Questions
  • Flashcards
  • Explain It
  • Key Terms
  • Cheat Sheet
  • Concept Map
  1. Write, compile and run Java programs that print output, read input and calculate with variables of primitive types.

    5 learning goals
    1. 1.Write, compile and run a Java program
    2. 2.Store data in variables of the right type
    3. 3.Calculate with arithmetic expressions
    4. 4.Convert values between types
    5. 5.Read input and build complete programs
  2. Control program flow with if statements, switch and while and for loops, using Boolean logic to express conditions.

    4 learning goals
    1. 1.Write conditions with Boolean logic
    2. 2.Choose between paths with if and switch
    3. 3.Repeat statements with loops
    4. 4.Solve problems with common loop patterns
  3. Write static methods with parameters and return values, and divide a program into small methods that each do one thing.

    5 learning goals
    1. 1.Write and call your own methods
    2. 2.Return results from methods
    3. 3.Follow variables and calls through a program
    4. 4.Overload methods
    5. 5.Divide a program into methods
  4. Store collections in ArrayLists and arrays, process them with loops and manipulate text with String methods.

    5 learning goals
    1. 1.Store and manage data in an ArrayList
    2. 2.Store fixed-size data in arrays
    3. 3.Process lists and arrays with loops
    4. 4.Work with text using String methods
    5. 5.Compare strings correctly and build text efficiently
  5. Define classes with fields, constructors and methods, create objects from them and protect object state through encapsulation.

    5 learning goals
    1. 1.Understand classes and objects
    2. 2.Give objects state with fields and constructors
    3. 3.Give objects behavior with instance methods
    4. 4.Protect object state with encapsulation
    5. 5.Describe objects and build complete classes
  6. Explain the difference between primitive and reference variables, pass objects to methods, build objects from other objects and compare them with equals and hashCode.

    5 learning goals
    1. 1.Tell primitive values and object references apart
    2. 2.Pass objects into methods and return them
    3. 3.Build objects from other objects
    4. 4.Compare objects for equality
    5. 5.Separate the user interface from the program logic
  7. Store and group data by key with HashMap, choose between Java collection types and sort collections with Comparable.

    6 learning goals
    1. 1.Store and look up data by key with HashMap
    2. 2.Count, group and index data with maps
    3. 3.Keep unique values with sets
    4. 4.Program with the List, Set and Map interfaces
    5. 5.Sort collections with Comparable
    6. 6.Choose the right collection for a task
  8. Reuse and extend code with inheritance and abstract classes, define contracts with interfaces and use polymorphism to write flexible programs.

    5 learning goals
    1. 1.Extend classes with inheritance
    2. 2.Override methods and use the Object class
    3. 3.Define contracts with abstract classes and interfaces
    4. 4.Write flexible programs with polymorphism
    5. 5.Model fixed values and data with enums and records
  9. Handle errors with checked and unchecked exceptions, and read and write files safely with try-with-resources.

    5 learning goals
    1. 1.Understand what exceptions are and how Java classifies them
    2. 2.Handle exceptions with try, catch and finally
    3. 3.Throw exceptions and design your own
    4. 4.Locate files and close resources safely
    5. 5.Read and write text files
  10. Organize a larger Java program into packages, sketch its structure with UML class diagrams and verify it with JUnit tests.

    5 learning goals
    1. 1.Organize a Java program into packages
    2. 2.Sketch program structure with UML class diagrams
    3. 3.Structure a program in layers
    4. 4.Verify code with JUnit tests
    5. 5.Build and test projects with Maven or Gradle
  11. Write generic classes and methods, pass behavior with lambda expressions and process collections with the Stream API.

    5 learning goals
    1. 1.Write generic classes and methods
    2. 2.Pass behavior with lambda expressions
    3. 3.Order objects with Comparator
    4. 4.Process collections with streams
    5. 5.Collect and apply stream results

What to take next

More Programming courses
Introduction to Programming with Python (Beginner)

You have never programmed, or you tried once and want a structured first course in a general-purpose language.

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started