khangaikhuu / advanced-cs

2 stars 0 forks source link

Team KEA 23/09/2019 Array List Issue-1 #1 #9

Closed erhem1 closed 5 years ago

erhem1 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

} }