why the constructor should be used in class,if there is no
constructor what will happen?
Answer Posted / yamini
Constructor is used initialize certian paramameters to each
object on their creation.We can also overload
constructors.So we can initialize objects with diff params.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is struts in java?
Explain when classnotfoundexception will be raised ?
Explain about map interface in java?
What is meant by the value of a variable?
What is a function argument in java?
What is a finally block? Is there a case when finally will not execute?
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
What is the difference between a choice and a list?
What are the differences between this and super keyword?
what is a thread pool in java and why is it used?
Why we do exception handling in java and how many types of exceptions are there?
write a program that list all permutations of ABCDEF in which A appears before B?
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?
what is meant by HQL?
What are the drawbacks of singleton class?