lveay2 / Java-Interviews-Data-Points

1 stars 0 forks source link

OOP #8

Open lveay2 opened 5 years ago

lveay2 commented 5 years ago

Key words: Abstract Class vs Interface

lveay2 commented 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:

https://raygun.com/blog/oop-concepts-java/

lveay2 commented 5 years ago

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:

https://raygun.com/blog/oop-concepts-java/

lveay2 commented 5 years ago

Abstraction Abstraction aims to hide complexity from the users and show them only the relevant information.

Abstraction in Java:

https://raygun.com/blog/oop-concepts-java/

lveay2 commented 5 years ago

Polymorphism Polymorphism refers to the ability to perform a certain action in different ways.

Polymorphism in Java:

https://raygun.com/blog/oop-concepts-java/

lveay2 commented 5 years ago

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