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
Does hashset allow duplicates in java?
What steps are taken when the OS shifts from one-thread execution to another?
What is scope of a variable?
What is a package in java? List down various advantages of packages.
What is the properties class?
What is prime number in java?
Why are global variables used?
Is an array a vector?
What is regex used for?
how can i use a nonsynchronized hashtable?
What is the use of java?
What does sizeof return?
Explain the difference between intermediate and terminal operations in java8?
What are controls and their different types in awt?
Why can't we make a class private in java?