Is it Mandatory to declare Methods with a Return Type in Method Declaration in Java?
In Java it is mandatory to declare Methods with a return type in a method declaration!
The data type of the return value in a method must correspond to the method declared return type if not ‘void’.