Explain, why the constructor is required in implemented
class?
Answer Posted / ejp
A constructor isn't required so the question is futile. Both
answers above are wrong.
Specifically, in reply #1, 'if constructor is not
there,variables might be taken the garbage values' is itself
complete garbage.
Reply #2, is mostly irrelevant, but this statement 'to call
them we need pass parameters in main method' is also wrong.
Parameters are not required, and the reference to the main
method is pointless.
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is the difference between a choice and a list?
What is variable in java?
What is a singleton in genetics?
How many characters is 2 bytes?
What is jit and its use?
How are observer and observable used in java programming?
Can a class be declared as protected?
What is the differences between c++ and java? Explain
What is a pattern what is an anti pattern?
What is run time allocation?
What initialize variables?
What are the four integer types supported by java?
What is mean by exception?
Can arraylist hold different types java?
Why java is secure? Explain.