What's the difference between constructors and normal methods?
Constructors must have the same name as the class and cannot return a value. They are only called once while regular methods could be called many times and it can return a value or can be void.
Constructors must have the same name as the class and cannot return a value. They are only called once while regular methods could be called many times and it can return a value or can be void.
No comments:
Post a Comment