Question: what is the difference between abstraction and encapsulation in java?
Answer: Difference between Abstraction vs Encapsulation. ... 2) Abstraction is about hiding unwanted details while giving out the most essential details, while Encapsulation means hiding the code and data into a single unit e.g. class or method to protect the inner working of an object from the outside world.