khangaikhuu / advanced-cs

2 stars 0 forks source link

Team Bread Exercise Two #6

Closed dumblingboi closed 5 years ago

dumblingboi commented 5 years ago

Complete the following Java code so that the output looks like the following. And Test the outputs

Output [Lion, Tiger, Cat, Dog] [Lion, Tiger, Elephant, Cat, Dog]

Java Code to Complete import java.util.ArrayList; import java.util.List;

public class CreateArrayListExample {

public ArrayList createArrayList() { // Creating an ArrayList of String with name animals

// Adding new elements to the ArrayList

// Adding an element at the particular index  in an ArrayList

} }