What is the difference between constructor and method
Answers
Answered by
1
Answer:
Constructor is used to initialize an object whereas method is used to exhibits functionality of an object. Constructors are invoked implicitly whereas methods are invoked explicitly. ... In the case of a method, no default method is provided. Constructor should be of the same name as that of class.
Answered by
0
Answer:
Difference between constructor and method in Java. Constructor is used to initialize an object whereas method is used to exhibits functionality of an object. Constructors are invoked implicitly whereas methods are invoked explicitly. Constructor does not return any value where the method may/may not return a value.
Similar questions
English,
4 months ago
Math,
4 months ago
Math,
9 months ago
Social Sciences,
9 months ago
Math,
1 year ago