Skip to content

Commit 7d246e0

Browse files
committed
abstract added
Signed-off-by: Someshdiwan <[email protected]>
1 parent c0be719 commit 7d246e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
You cannot create an instance of an abstract class in Java.
2+
3+
Abstract classes are designed to be incomplete and serve as a base for other classes.
4+
5+
They may contain abstract methods, which have no implementation, making it impossible to instantiate them directly.
6+
7+
However, you can create instances of concrete subclasses that extend the abstract class and provide implementations
8+
for all abstract methods.

0 commit comments

Comments
 (0)