Tech IndustryJun 20, 2019
NewrmfK88

Python OOPs vs Java OOPs

I know this is a stack overflow question but I want to understand from the tech people who work with these languages daily. How Java Object Oriented is different than Python Object Oriented model. Thanks in advance

Add a comment
Oracle gh4yk Jun 20, 2019

Python is a duct tape job oop.

Tableau ThePlague Jun 20, 2019

It's called duck type, not duct tape

NASDAQ cTrt88 Jun 20, 2019

^^

TD _Canadian_ Jun 20, 2019

There are no interfaces in Python. In Java, a class can extend only one class but in Python, you can extend multiple classes. In Java, you have access modifiers that let you declare who can access fields or methods in a class (private, protected, public, default) but in Python, you can't enforce such access control. In Python, you can have functions outside a class but in Java, that's not possible.