Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.List;
- public class Main {
- public static void main(String[] args) {
- System.out.println("test");
- List<String> exampleList = new ArrayList<>();
- System.out.println(exampleList);
- exampleList.add("Pizza");
- exampleList.add("Lobster bisque");
- exampleList.add("STEAK & STEAMED LOBSTER TAIL");
- exampleList.add("Our signature steak paired with a steamed lobster tail.");
- exampleList.add("STEAK WITH CRISPY LOBSTER & SHRIMP");
- exampleList.add("Our twist on the classic steak and lobster.");
- exampleList.add("Succulent hand-breaded lobster and shrimp,");
- exampleList.add("fried golden brown and paired with a homemade sweet and spicy sauce.");
- System.out.println(exampleList);
- exampleList.remove(1);
- System.out.println();
- System.out.println("Removing the second item");
- System.out.println(exampleList);
- System.out.println();
- System.out.println("Removing the String Pizza");
- System.out.println();
- exampleList.remove("Pizza");
- System.out.println(exampleList);
- for (String food : exampleList) {
- System.out.println("I want to try "+ food);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement