| Share this post! | Vote this! |
|
In this lecture, we’ll cover remaining OOP concepts like default constructors, garbage collection, this reference.
Default Constructor (Method)
The default constructor (no-arg constructor) is the constructor without any parameters. If the class does not specify any constructors, then an implicit default constructor is created.- Classes can have more than one constructor
- All constructors have the same name (the class name)
- Each constructor differs from the others in either the number or types of its arguments
- New is used when using a constructor to create a new object more...



0 comments:
Post a Comment