Java requires that a method declare the data type of the value that it returns . If a method does not return a value, it must be declared to return void . Methods can return either values of primitive data types or of reference data types.
Java requires that a method declare the data type of the value that it returns . If a method does not return a value, it must be declared to return void . Methods can return either values of primitive data types or of reference data types.