Thursday, January 22, 2015

Overview

Here’s a small table that shows the difference between abstract, sealed and static classes. See the example below. More info can be found here.

1
2
3
4
5
6
7
8
9
/*
+-------------------------+--------+--------+--------+----------+
|       Class Type        | normal | static | sealed | abstract |
+-------------------------+--------+--------+--------+----------+
| Can be instantiated     | yes    | no     | yes    | no       |
| Can be inherited        | yes    | no     | no     | yes      |
| Can inherit from others | yes    | no     | yes    | yes      |
+-------------------------+--------+--------+--------+----------+
 */

Random Posts