Object-Oriented Java

Object-oriented programming (OOP) in Java.

Start[missing "en.views.course_landing_page.learn-java.course_illustration" translation]
Object-Oriented Java
Lesson 1 of 1
  1. 1

    Java is an object-oriented programming (OOP) language, which means that we can design classes, objects, and methods that can perform certain actions. These behaviors are important in the constructi...

  2. 2

    One fundamental concept of object-oriented programming in Java is the class. A class is a set of instructions that describe how a data structure should behave. Java provides us with its own s...

  3. 3

    We're off to a good start! We created a Java class, but it currently does not do anything; we need to describe the behavior of the class for it to be useful. Let's start by creating the starting s...

  4. 4

    When we create a new class, we probably have specific details that we want the class to include. We save those specific details into instance variables. Here is an instance variable in the [....

  5. 5

    Perfect! By adding a class constructor and creating instance variables, we will soon be able to use the [...] class. However, the class constructor [...] is still empty. Let's modify this by ad...

  6. 6

    We're almost ready to use our custom [...] class! But first, we need to understand how to structure and run our Java program. You may have noticed a mysterious looking line of code in previous l...

  7. 7

    Perfect! Now that we have a [...] method in our class, we're ready to start using the [...] class. To use the [...] class, we must create an instance of the [...] class. An instance of...

  8. 8

    Great work! We created a [...] object inside of the [...] method, but...nothing happened. Although we created an object inside of [...] method, we did not print out anything about the [...]...

  9. 9

    Great! Now the [...] method is available to use on the [...] object. We can do this by calling the method on [...] . Here is an example of calling a method on an object using the [...] ...

  10. 10

    Fantastic! Similar to constructors, you can customize methods to accept parameters. [...] In the example above, we create a [...] method that accepts an [...] parameter called [...] . ...

  11. 11

    Let's explore one of the keywords used in declaring a method. In past exercises, when creating new methods, we used the keyword [...] . The [...] keyword indicates that no value should be retur...

  12. 12

    You've created a fully functional [...] class. Congratulations! One of the object-oriented programming concepts that allows us to reuse and maintain code more efficiently is called inheritance...

  13. 13

    Great work! Let's review everything that we've learned about object-oriented programming in Java so far. - Class: a blueprint for how a data structure should function - Constructor: instructs...

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo

Object-Oriented Java

Start[missing "en.views.course_landing_page.learn-java.course_illustration" translation]