This is what I have. I am sure it is probably something simple, but can't seeme to find it.
import javax.swing.JOptionPane;
public class Ovrldmeth {
public static void main(String[] args) {
System.out.printf("Num 1\tNum 2\tResult", sub(7,3), sub(13.5,12.6), sub(9.9, 3), sub(6,2.9));
}
public static int sub(int num1, int num2) {
return (num1 > num2) ? num1 - num2 : num2 - num1;
}
public static int sub(double num1, double num2) {
return ((num1 > num2) ? num1 - num2 : num2 - num1);
}
public static int sub(double num1, int num2) {
return ((num1 > num2) ? num1 - num2 : num2 - num1);
}
public static double sub(int num1, double num2) {
return (num1 > num2) ? num1 - num2 : num2 - num1;
}
}