The following text was written to the standard output stream when the WordList.java program was executed from IntelliJ.
>>> help HELP - display a menu of commands DISPLAY - display the list of words PRINT - print a word (FIRST;LAST;nth) SWAP - exchange two elements (nth;mth) ADD - add a word to the list (FIRST;LAST) EXIT - terminate execution of the program >>> display apple pear peach blueberry orange pumpkin corn squash cucumber tomato potato >>> print first apple >>> print last potato >>> swap 2 4 >>> display apple blueberry peach pear orange pumpkin corn squash cucumber tomato potato >>> add first egg >>> display egg apple blueberry peach pear orange pumpkin corn squash cucumber tomato potato >>> exit