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 Hood Warspite Renown Repulse Yorktown Saratoga Lexington Enterprise Okalahoma Nevada Pennsylvania Elizabeth Monarch Illustrious Formidable >>> print 2 Warspite >>> print 5 Yorktown >>> swap 2 5 >>> display Hood Yorktown Renown Repulse Warspite Saratoga Lexington Enterprise Okalahoma Nevada Pennsylvania Elizabeth Monarch Illustrious Formidable >>> add first California >>> add last Hornet >>> Display California Hood Yorktown Renown Repulse Warspite Saratoga Lexington Enterprise Okalahoma Nevada Pennsylvania Elizabeth Monarch Illustrious Formidable Hornet >>> exit