Open lveay2 opened 5 years ago
Encapsulation Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation.
https://docs.oracle.com/javase/tutorial/java/concepts/object.html
Encapsulation in Java:
Inheritance Object-oriented programming allows classes to inherit commonly used state and behavior from other classes.
https://docs.oracle.com/javase/tutorial/java/concepts/inheritance.html
Inheritance in Java:
Abstraction Abstraction aims to hide complexity from the users and show them only the relevant information.
Abstraction in Java:
Polymorphism Polymorphism refers to the ability to perform a certain action in different ways.
Polymorphism in Java:
Interface An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface.
https://docs.oracle.com/javase/tutorial/java/concepts/index.html
Key words: Abstract Class vs Interface