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 […]

Categories
Core JAVA

Method or Function in Java

METHOD OR FUNCTION IN JAVA Java support 6 types of method Static method Non-static method Final method Abstract method Native method Synchronized method Static Method The method declared with the static keyword is known as a static method. If the method is static we can call it by class name, directly and object name. The […]