I'm doing an assignment for a class and I can't figure out what I'm doing wrong to keep getting the "illegal start of expression" error. Any help would be appreciated.
public class Overloading {
public static void main(String[] args) {
public static int max(int num1, int num2) {
if (num1 > num2)
return num1;
else
return num2;
}
public static double max(double num1, double num2) {
if (num1 > num2)
return num1;
else
return num2;
}
public static int max(double num1, double num2) {
if (num1 > num2)
return num1;
else
return num2;
{
public static double max(int num1, double num2) {
if (num1 > num2)
return num1;
else
return num2;
}
}