Python vs Java: Object Oriented Programming (Overview)
Java programmers making a move to Python often struggle with Python’s approach to object-oriented programming (OOP). The approach to working with objects, variable types, and other language capabilities taken by Python vs Java are quite different. It can make switching between both languages very confusing.
This course compares and contrasts object-oriented programming support in Python vs Java. By the end, you’ll be able to apply your knowledge of object-oriented programming to Python, understand how to reinterpret your understanding of Java objects to Python, and use objects in a Pythonic way.
In this course, you’ll learn how to:
- Build a basic class in both Java and Python
- Explore how object attributes work in Python vs Java
- Compare and contrast Java methods and Python functions
- Discover inheritance and polymorphism mechanisms in both languages
- Investigate reflection across Python vs Java
- Apply everything in a complete class implementation in both languages
This course isn’t a primer on object-oriented programming. Rather, it compares object-oriented features and principles of Python vs Java. Students should have some knowledge of Java, and also be familiar with coding Python. If you are unfamiliar with object-oriented programming, then check out Intro to Object-Oriented Programming (OOP) in Python.
00:00 Welcome to this course on Object-Oriented Programming in Python versus Java. If you’re a Java programmer wanting to know how object-oriented programming works in Python, you’re in the right place. In this course, we will compare class definitions in Java and Python, look at fields, methods, inheritance, and more.
00:22 Python handles object-oriented programming in a different way than Java does. We’ll be exploring those differences as we build a functional class in Python.
00:33 In this course, you will build and compare a simple class in both Java and Python, explore object and class attributes in Python, learn about writing functions separate from any class or object, discover inheritance and polymorphism mechanisms in Python, learn how an object can discover information about itself in Python, and finally, build a complete Python class applying all that you have learned.
01:05 In our first lesson, we will compare a simple class written in both Java and Python.
Become a Member to join the conversation.