reset password
Author Message
chern227
Posts: 7
Posted 17:45 Sep 06, 2018 |

I have a question regarding the default constructor and the one that accepts comma separated arguments. Do we name the method name, the same as the class name for the method that accepts the comma separated arguments?

kknaur
Posts: 540
Posted 18:21 Sep 06, 2018 |

Go back and review the three rules of a constructor.

apena78
Posts: 16
Posted 18:41 Sep 06, 2018 |

For it to be a constructor if has to have the same name as the class. So both constructors should be the same. Take a look at the notes/class code on the  books class -- good example on how it should look (it doesnt use this. tho)