In this article,Categories of Java and Program using two classes explained in detail with examples. we will come to know about the information on how methods are created and categorized with examples provided with output and code file.
Based on return type and parameters,methods in java are categorized into 4 type.
- Methods without return type and without parameters.
- Methods without return type and with parameters.
- Methods with return type and without parameters.
- Methods with return type and with parameters.
//Program based on Categories of Java and Program using two classes.
class example (From the topic Categories of Java and Program using two classes)
{
//without return type and without parameters.