Advertisement
Krystman

Array List

Mar 5th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. ArrayList<String> fellowship;
  2.  
  3. fellowship = new ArrayList<String>();
  4.  
  5. fellowship.add("Frodo");
  6. fellowship.add("Bilbo");
  7. fellowship.add("Gandalf");
  8. fellowship.add("Waluigi");
  9. fellowship.add("Sam");
  10. fellowship.add("Pikachu");
  11. fellowship.add("Waluigi");
  12.  
  13. fellowship.remove("Waluigi");
  14.  
  15. println("Our Smash Roster contains:");
  16. for (int i=0; i < fellowship.size(); i++) {
  17.   println(fellowship.get(i));
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement