-
List some properties of constructors in java?
1. You need not code them explicitly. Java will automatically place a default constructor 2. You can pass arguments to the constructor 3. They can return only an object of type of that class 4. They...
-
How do you use constructor?
Every class, including abstract classes, MUST have a constructor. Hard Code that into your brain. But just because a class must have one, doesn't mean the programmer has to type it. A constructor...
-
Use of constructor?
to create an instance of object
-
What is the use of constructors?
Constructors are used in object-oriented programming languages to create usable instances of abstract data types (classes).
-
Why you use constructors?
To create an instance of the class that implementing that constructor