New to Java. This program is supposed to output the differenc between two sales figures. I cannot figure out what the problem is. A huge thank you for your help.
public class Earnings
public static void main(String args)
final int salesReps = 2; //Number of sales reps to compare
double sales = new double[salesReps]; //Create array
Scanner keyboard = new Scanner(System.in); //For keyboard input
System.out.println("Enter the total sales amount for "
+salesReps+ " sales representatives to compare. "); //Ask for sales figures
for (int index = 0; index
System.out.print("Sales representative " + (index +1) + " sold ");
System.out.println("Sales representative 1 sold"
+(sales-sales)+ " more than sales representative 2.");
System.out.println("Sales representative 2 sold"
+(sales-sales)+ " more than sales representative 1");