Constructor overloading in java allows to have more than one constructor inside one Class. in last article we have discussed about method overloading and overriding and constructor overloading is not much different than method overloading. Just like in case of method overloading you have multiple methods with same name but different signature, in Constructor overloading you have multiple constructor with different signature with only difference that Constructor doesn't have return type in Java. Those constructor will be called as overloaded constructor . Overloading is also another form of polymorphism in Java which allows to have multiple constructor with different name in one Class in java.
Sabtu, 21 Januari 2012
core java
What is Constructor overloading in Java with Example
Read more »
0 Response to "What is Constructor overloading in Java with Example"
Posting Komentar