Explain role of constructor in a java application?
Answer Posted / sonal
Without a constructor u cannot make an object or instance
of a class.
Every class must have a constructor. If no constructor is
provided the complier will provide default constructor at
run time.
| Is This Answer Correct ? | 33 Yes | 2 No |
Post New Answer View All Answers
Why wait and notify methods are declared in object class?
Is it necessary that each try block must be followed by a catch block?
What is the purpose of static methods and variables?
What is var keyword ?
What does string intern() method do?
What two classes are used to read data only?
What means public static?
How does sublist works in java?
Why do we create public static method in java?
What is array initialization in java?
What is meant by oops concept in java?
How to sort array in descending order in java?
What is anti pattern in programming?
Which category the java thread do fall in?
What are constants?