Categories
Core JAVA

Difference between constructor and method

Difference between method and constructor The following are the difference between method and constructor. Method name may or may not be the same as the class name whereas the constructor name must be same as the class name. A method should have a return type in java where are constructor never returns any value, so […]