This is my current program for taking input and giving the user a total pay over two days. I am currently trying to separate strings from a string array (Made after .split(", ")) and put those strings into its own array to process. I am also doing this same process with integers but so far I can't get the string separation to work properly. any help will be appreciated.*note, I am a somewhat beginner with this and only took one class so far so please keep it simple.
import java.util.Scanner;
public class AmusementPark
{
public static void main(String[] args)
{
Scanner Reader=new Scanner(System.in);
int [] WorkScheduleInts;
String [] WorkScheduleStrings=new String[8];
System.out.println("Please enter the work schedule as follows:");
System.out.println("125, 2, 1, 7, 125, 3, 5, H");
System.out.println("Enter Your work schedule:");
String WorkScheduleinput=Reader.nextLine();
String [] WorkScheduleSplit=new String[8];
WorkScheduleSplit=WorkScheduleinput.split(", ");
for(int x=0; x<WorkScheduleSplit.length;x++)
{
if(WorkScheduleSplit[x]=="A" || WorkScheduleSplit[x]=="B" || WorkScheduleSplit[x]=="C" || WorkScheduleSplit[x]=="D" || WorkScheduleSplit[x]=="E" || WorkScheduleSplit[x]=="F" || WorkScheduleSplit[x]=="G" || WorkScheduleSplit[x]=="H")
{
WorkScheduleStrings[x]=WorkScheduleSplit[x];
}
System.out.println(WorkScheduleStrings[x]);
}
}
}