import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
//ArrayList = a resizable array.
// Element can be added and removed after compilation phase
// store reference data types.
ArrayList<String> food = new ArrayList<String>();
food.add("pizza");
food.add("hamburger");
food.add("Noodles");
food.set(0, "sushi");
food.remove(2);
//food.clear();
for(int i=0; i<food.size(); i++) {
System.out.println(food.get(i));
}
}
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)