SHARE
TWEET

Untitled

a guest Mar 26th, 2020 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ArrayList<String> list = new ArrayList<String>();
  2.         list.add("Hallo");
  3.         list.add("Hallo");
  4.         list.add("nix");
  5.         list.add("Hallo");
  6.         list.add("nix");
  7.         list.add("Hallo");
  8.         list.add("nix");
  9.         list.add("Hallo");
  10.        
  11.         for (int i = 0; i < list.size(); i++) {
  12.             if(list.get(i).contentEquals("Hallo") ){
  13.                 list.remove(i);
  14.                 i--;
  15.             }
  16.         }
  17.         System.out.println(list);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top