Explain, why the constructor is required in implemented
class?
Answer Posted / sekhar
Constructor is like a method.It can be invoked as soon as
we create an object for the class.We can overload
constructor.to call them we need pass parameters in main
method.
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What are the application of stack?
What is java thread dump, how can we get java thread dump of a program?
What is a method vs function?
What is == and === in javascript?
Are arrays classes in java?
What is the difference amongst jvm spec, jvm implementation, jvm runtime ?
What are the two environment variables that must be set in order to run any java programs?
Can we sort hashset in java?
Can you give few examples of final classes defined in java api?
What is hotjava?
How do you check if a character in a string is a digit or letter?
What is the use of keywords in java?
What kind of variables can a class consist?
Can we override the overloaded method?
How to optimize the javac output?