I am a beginner in learning Java,
I Know this method is working,
public static double max(double num1, double num2) {
return Math.max(num1, num2);
}
I am asking why not using directly something like that:
public static double max(double num1, double num2) {
System.out.println (Math.max(num1, num2));
It is not working as far as I know
How could we know and predetermin that the method we write would need a "return" or "System.out.println" ?