From the course: Learning JVM Languages: JVM, Java, Scala

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

OOP in Java

OOP in Java

- [Instructor] Hello, this is a new section, Java. These are the topics we'll discuss in this section. Object oriented programming, OOP in Java, and programming in Java. Now, we move onto the first video of this section that deals with OOP in Java. This video concentrates on all OOP related subjects, like defining classes and packages, adding class members, variables, and methods, constructors and deconstructors, the concept of inheritance, interfaces, and abstract classes. While Java is not considered a peer OOP language, because of its support for primitive types, it is still a serious OOP language. First, we'll define a class. As we've seen in the examples from previous sections, a class can simply be defined with Java's class keyword followed by the class name and curly brackets. The brackets visually show the program and what code is par for the class. This code will compile. It compiles with all Java syntax rules. And moving any part will result in compile errors. The naming…

Contents