WordList.java

The following text was written to the standard output stream when the ? program was executed from IntelliJ.

>>> help
HELP - display a menu of commands
DISPLAY - display the list of numbers
PRINT - print a String (FIRST;LAST;nth)
SWAP - exchange two elements (nth;mth)
ADD - add a String to the list (FIRST;LAST)
EXIT - terminate execution of the program
>>> display
dog
boat
computer
screen
wire
cart
board
water
boil
float
high
sit
>>> print first
dog
>>> print last
sit
>>> print 3
computer
>>> print 18
null
>>> swap 1 2
>>> display
boat
dog
computer
screen
wire
cart
board
water
boil
float
high
sit
>>> swap 1 18
>>> display
null
dog
computer
screen
wire
cart
board
water
boil
float
high
sit
>>> help
HELP - display a menu of commands
DISPLAY - display the list of numbers
PRINT - print a String (FIRST;LAST;nth)
SWAP - exchange two elements (nth;mth)
ADD - add a String to the list (FIRST;LAST)
EXIT - terminate execution of the program
>>> add first two
>>> add last three
>>> showwords
### Unrecognizable command: showwords
>>> display
two
null
dog
computer
screen
wire
cart
board
water
boil
float
high
sit
three
>>> exit