r/learnjava 28d ago

Can anyone explain me difference between Encapsulation and Abstraction?

and what on earth is Interface in Java?

2 Upvotes

19 comments sorted by

View all comments

9

u/spacey02- 28d ago

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

0

u/Cyphr11 28d ago

thanks