Explain, why the constructor is required in implemented
class?
Answer Posted / vimalan
constructor is used for initializing the class
variables.if constructor is not there,variables might be
taken the garbage values.To avoid garbage
values ,constructor is used.
Example:
Java:
int i;
initial value i=0;
C:
int v;
v=8823
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is the difference between a loader and a compiler?
Write a code to create a trigger to call a stored procedure
What is replaceall in java?
What is isa relationship?
What is jpa specification?
Is java based on c?
Is minecraft 1.15 out?
Why vector class is used?
Is int a class in java?
Difference between overriding and overloading in java?
Is the milky way in a void?
What are predicates in java 8?
What is procedure writing?
Is java a utf 8 string?
What is the difference between abstract classes and interfaces?