r/learnjava • • Nov 29 '25

Can someone Please Help me understand INTERFACES and exactly why need them?

I get the point of Multiple Inheritance but not the "WHY" behind achieving 100% Abstraction for the methods. Confused in Tight and Loose Coupling as well. Sometimes I feel I understand, the next moment again confused :) I need this information because I have started LLD, LLD needs Abstraction ... I know all of OOP Concepts of Java but interfaces always confuse me.

Thank you.

32 Upvotes

30 comments sorted by

View all comments

Show parent comment

1

u/Sonu_64 Dec 05 '25

Useful in creating Spring Boot APIs the correct way...right ?

2

u/NikitaBerzekov Dec 05 '25

I think you might be confusing what an API is. An API is just classes and functions that a library exposes to you. A good library should not expose internal classes and functions that might change a lot, or that are not designed to be used outside the scope of the library

2

u/Sonu_64 Dec 05 '25

Got it now 👍🤞 Even Gemini gave me a lot of API Design Examples to make me understand interfaces.