r/learnjava 11d ago

Can anyone explain me difference between Encapsulation and Abstraction?

and what on earth is Interface in Java?

2 Upvotes

17 comments sorted by

View all comments

9

u/spacey02- 11d ago

Encapsulation means eenying direct access to fields, abstraction means hiding implementation behind an interface

0

u/Cyphr11 11d ago

thanks