Python OOPs vs Java OOPs

New / Eng
rmfK88

New Eng

PRE
The Walt Disney Company
rmfK88more
Jun 20 4 Comments

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

Want to comment? LOG IN or SIGN UP
TOP 4 Comments
  • Oracle gh4yk
    Python is a duct tape job oop.
    Jun 20 2
    • Tableau / Eng
      ThePlague

      Tableau Eng

      PRE
      Microsoft
      ThePlaguemore
      It's called duck type, not duct tape
      Jun 20
    • NASDAQ cTrt88
      ^^
      Jun 20
  • TD
    _Canadian_

    TD

    PRE
    IBM
    _Canadian_more
    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.
    Jun 20 0