DEV Community

Discussion on: How to learn object oriented programming

Collapse
 
bradtaniguchi profile image
Brad

There's plenty of excellent resources linked, and provided above, so I want to give my experience when learning OOP, I was pretty confused until I realized that there are really 2 main parts:

  1. The syntax

  2. The concept

Lets get this down first, Java syntax is verbose, knowing what the syntax means is a good first step into understanding the concept. Java is very Object Oriented (its an OOP language), so it learning its syntax is a great way get your "foot in the door" with actually understanding the concept.

Knowing what all the syntax for the hello world program in Java will help you understand parts of OOP:

public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");
    }

}

OOP as a concept is actually pretty interesting and much easier to grasp in the idea that classes are blueprints to make instances of objects. If you think of something, that something could be described as a class, which can create instances.

You can extend and inherit classes to expand what they do. There is a lot of syntax and concepts that go along with OOP but the general idea is pretty simple. Goodluck 😄