What is constructor
Answers were Sorted based on User's Feedback
Answer / nagendra kumar
1.A Constructor is Just like a method without return type.
2.The Class name and the Constructor name should be same.
3.Constructor are useful to initialize instance variable
with their default values.
4.Constructor can be executed only once while creating the
Object.
Is This Answer Correct ? | 43 Yes | 2 No |
Answer / jaseer v
Special function that is used to initialise the objects
Name same as class
.............
Is This Answer Correct ? | 13 Yes | 6 No |
Constructor is the method which has the same name of class
and constructors are executed only once at the time of
object creation
Is This Answer Correct ? | 7 Yes | 0 No |
Constructor is a method like other methods but it has
the same as the class name and it has no any return type
not even void.
Connstructor is invoke only once at the time of object
creation. We can overload the constructor.
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / mah
constructor is similar to a function.constructor name and
class name should be same.constructor donot return any value
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / guest
constructor is special method with the class name and
without any return value.
whenever the object is created the constructor is called
automatically according to the argument passed.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / diya
constructor is a special function whose task is to
initialise the object.the name of the constructor is as
same as the class.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / venu
Constructor is a member function of a class..Which gets called whenever you create an object of that class
Is This Answer Correct ? | 0 Yes | 0 No |
Can You Have Virtual Functions In Java?
Which variable is the independent variable?
How do you sort arraylist in descending order?
Is multiple inheritance allowed in Java? Why ?
How does a cookie work in Servlets?
Which method cannot be overridden in java?
What is native code?
What is JAVA? Why it is platform independent?
whst is encapsulation?when u encpsulate actually while devoloping code?
To what value is a variable of the Boolean type automatically initialized?
Name the methods that used to get and set the text label displayed by a Buttonobject?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion