For my project, I have to simulate CPU scheduling FCFS algorithm. The processes (pid, arrival time, burst time) are coming from a text file which I then read that file in java and get those processes added into an ArrayList. Then using those processes I must do FCFS on it but I am confused on how to do it like how do I start it. This is what I have so far. I was told to make a process class and then use ArrayList<Processes> process = new ArrayList<>();
and add the processes there but when I try to see if the processes were added to the arrayList I am unable to loop through them and actually check that they have been added. I need help sorting the arrayList by arrival time as well. I just need help with adding the actual processes into the arrayList and getting started with doing the FCFS part if anyone can give me pointers.

import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class CPUScheduling {

public static void main(String[] args) throws Exception{

File file = new File("processes.txt");

BufferedReader br = new BufferedReader(new FileReader(file));
ArrayList<Processes>process = new ArrayList<>();
String st;

while((st = br.readLine()) != null) {
System.out.println(st);

String pid = st.split(" ")[0];
int arrivalTime = Integer.parseInt(st.split(" ")[1]);
int burstTime = Integer.parseInt(st.split(" ")[2]);


System.out.println("my first column : "+ arrivalTime);

}

Scanner s = new Scanner(new File("processes.txt"));
ArrayList<String> processes = new ArrayList<String>();
while (s.hasNext()){
processes.add(s.next());
}
for(int i = 0; i < processes.size(); i++) {

System.out.println(processes.get(i));
}
}
}
public class Processes {
public String pid;
public int arrivalTime;
public int burstTime;
public int turnAroundTime;
public int waitingTime;
public int responseTime;
public int exit;
public boolean completed;

public Processes(String pid, int arrivalTime, int burstTime) {
this.pid= pid;
this.arrivalTime = arrivalTime;
this.burstTime = burstTime;
turnAroundTime= 0;
waitingTime = 0;
completed = false;
exit = 0;
}
}