Easy.java

Resource The Java Documentation will come in handy. To find the String and ArrayList classes, just use the search box in the upper right-hand corner of the page.

Shell CodeDownload the shell file Easy.java on the left. The comments in the file tell you what to do.

The file is shown here if you'd like to copy and paste it.

/**************************************************
*   Author: YOU
*   Date created: 27 Aug 2020
*   Date last modified: 27 Aug 2020
**************************************************/
import java.util.ArrayList;
public class Easy
{
    public Easy()
    {
    }
    
    public static void main(String[] args)
    {
        //Make an array list of Strings
        //add the strings "cat", "dog", "elephant", "ferret", and "goat" to it
        //print the list 
        //Replace all of the entries in the list with
        //upper-case versions.
        //print the list
        //empty the list
        //print the list
    }
}

Here is what happens when you run it if you have coded it properly.

unix> java Easy
[cat, dog, elephant, ferret, goat]
[CAT, DOG, ELEPHANT, FERRET, GOAT]
[]
unix>