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
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
comments
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.