r/FullStack • • 16d ago

Career Guidance Which OOP concept is the most difficult to understand in Java ?

Many beginners find abstraction, polymorphism, and the difference between interfaces and abstract classes challenging. Practice with real examples, such as payment systems or employee management, to understand when and why each concept is useful.

19 Upvotes

12 comments sorted by

5

u/Nervous-Resource-170 16d ago

I think abstraction is bit more challenging because there are two ways to achieve it, abstract class and interface, where to use which and their differences, especially their use cases can be somewhat tricky in interview.

2

u/whiterhino8 16d ago

Java hard to those who don't like verbosity .

1

u/Available_Safe1818 16d ago

When did you last see it? Modern java is far less verbose.

1

u/jboogyoogy 16d ago

I would say polymorphism
Especially to understand how interfaces and inheritance work together
It usually clicks once you start applying it in real projects rather than just reading about it theoretically

1

u/JaseciLabs 16d ago

A rule of thumb: an interface says what something can do, an abstract class is for related types that share state or code. And a class can implement many interfaces but extend only one, which settles a lot of cases.

1

u/martinsedd Stack Juggler (Fullstack) 16d ago

I personally don’t think any individual concept in OOP is particularly difficult to understand. The issue, I find, is learning how to think in terms of OOP and applying the right tool for the right job.

1

u/AbroadNo1914 15d ago

Correct me if Im wrong but wasnt Interfaces invented to fix the issues of Abstraction (Composition over Inheritance) of obscure deep nested implementations

1

u/Downtown-Bag-6026 15d ago

Interfaces are implemented and abstract classes are inherited.

Meaning an Apple class may implement a database interface but inherits from Fruit class. Because an Apple is not a database but it is a fruit and it does conform to data base defined features.

1

u/ExtraTNT 12d ago

Why things are done so fucking complex, when monads exist…