whats the problem?
import java.util.Scanner; import java.util.ArrayList; public class Remove{ static boolean pressed = false; public static void press(){ pressed = true; } public static void notPressing(){ pressed = false; } } public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String x = scan.nextLine(); ArrayList<String> arr = new ArrayList<String>(); arr.add ("Jonathan"); arr.add ("Ron"); arr.add ("Levi"); arr.add ("Morlo"); Remove r = new Remove(); // r.press(); if (r.pressed == true && (x == "Jonathan" || "Ron" || "Levi" || "Morlo")){ arr.remove (x); System.out.println (arr); }else if (x != "Jonathan" || "Ron" || "Levi" || "Morlo"){ System.out.println ("There is no such a Participant"); }else{ System.out.println (arr); } } }