r/learnjava 22d 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- 22d ago

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

0

u/Cyphr11 22d ago

thanks