Hi I need some help with this question. We must write a program that reads arguments and prints them in reverse. Must the arguments be stored in a array and then printed in reverse or must there be input from the keyboard. Looking at the program execution example given ">java Reverse To be or not to be" .Is that a example that must be input in the command line? Anybody that completed this question that can please me to get it right. Thanx
My understanding of the question is that the input must be read from the keyboard.
I then took the input, split the string into words using the split() method and stored the words in an array.
Finally, I used a for loop to print the words to the screen.