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 double in java?
What is the use of private static?
What's the difference between int and integer in java?
What is the difference between a static and a non-static inner class in java programming?
What is a data structure java?
What is garbage collection? Can it be forced to run?
What is variable and example?
Explain about method local inner classes or local inner classes in java?
Why multiple inheritance is not supported by java?
Java is pass by value or pass by reference? Explain
What is number data type?
Which of the following is not an isolation level in the JDBC
What are the advantages of java?
Why are functions called methods in java?
Is there a sort function in java?