Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Sammy Samkough
- // Test
- // Spec: To test things out.
- import java.util.ArrayList;
- public class Test
- {
- public static void main(String args[])
- {
- ArrayList <String> r = new ArrayList <String>();
- r.add("2");
- r.add("3");
- System.out.println(r);
- r.add("12");
- r.add("6");
- r.remove("3");
- r.remove(2);
- r.set(1, "4");
- System.out.println(r.indexOf("12"));
- System.out.println(r.contains("2"));
- System.out.println(r.size());
- }
- }
- /*
- [2, 3]
- -1
- true
- 2
- Press any key to continue . . .
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement