Skip to content

Commit 6f2fa05

Browse files
authored
Added some contents in Abstract readme
1 parent e5433fc commit 6f2fa05

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Interface and Abstract Class/readme.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
* Interface basically has two main components
44
- Constants (By default)
55
- Methods (They do not have data type)
6-
* When we implement the **Interface** to a class then we nedd to define all the **methods** of the Interface.
6+
* When we implement the **Interface** to a class then we need to define all the **methods** of the Interface.
77

88
# Abstract
9-
* Abstract is similar to Interface. It is a class itself.
9+
* It is any class having one or more abstract methods.
10+
* Abstract is similar to Interface. The difference: Not all methods need to be over-ridden; common methods can be defined within the Abstract class itself.
11+
* Objects of Abstract classes cannot be made. It can only be inherited.
12+
* If one or more method is declared abstract, its class must also be abstract.
1013
* When we extend an Abstract Class to a Class, we need to define all the **methods** defined in the Abstract Class else the derived class again should be Abstract.
14+
* It can have final methods i.e. methods that cannot be over-ridden.

0 commit comments

Comments
 (0)