donaricano-btn

Abstract class

- A class that is declared with abstract keyword, is known as abstract class

- It can have abstract and non-abstract methods


1. Abstraction in java

- Abstraction is a process of hiding the implementation details 

- It showing only functionality to the user

- Abstraction lets you focus on what the object does instead of how it does it


1) Ways to achieve Abstraction

- Abstract class

- Interface

2. Example

3. Abstract class having constructor, data member, methods

- If there is any abstract method in a class, that class must be abstract

- If you are extending any abstract class that have abstract method, you must either provide the implementation of the method or make this class abstraction



'Back-End > Java_1' 카테고리의 다른 글

[Java] Package  (0) 2016.09.12
[Java] Interface  (0) 2016.09.12
[Java] Instanceof  (0) 2016.09.09
[Java] Static Binding and Dynamic Binding  (0) 2016.09.08
[Java] Runtime Polymorphism  (0) 2016.09.08
블로그 이미지

리딩리드

,