constructor in abstract class (#29329)

Have added some information in abstract classes
This commit is contained in:
Shoaib
2019-06-25 09:51:06 -07:00
committed by Randell Dawson
parent c8ca40751b
commit 9cccd52aec

View File

@ -46,7 +46,7 @@ Car carObj = new Car(); // valid
Motorcycle mBikeObj = new Motorcycle(); // valid
```
If the child class doesn't implement the abstract methods of the parent, it becomes an abstract class.
If the child class doesn't implement the abstract methods of the parent, it becomes an abstract class. An abstract class can also contain constructors. A constructor of abstract class is called when an instance of a inherited class is created.
#### More Information
- [Oracle Java Docs - Abstract Classes](https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.1.1)
- [Oracle Java Docs - Abstract Classes](https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.1.1)