If the user's input is not right, tell the user what the valid choices are and exit the program.
Type: Posts; User: Norm
If the user's input is not right, tell the user what the valid choices are and exit the program.
What is on the command line when the program is executed? If the user entered:
java CaesarBox - encrypt
then args[0] woluld be "-" and args[1] would be "encrypt"
Does the program want to...
What is the value of args[0] when the program is executed?
Please edit your post and wrap your code with code tags:
<YOUR CODE HERE>
to get highlighting and preserve formatting.
args[0] is a String not an array of String
Try: String mess = args[0]....
You are still not coding arrays correctly:
() are used with methods
[] are used with arrays
What is args(0)? See post#4
Please copy the full text of the error messages and paste it here.
Note:
[] are used with arrays
() are used with methods and constructors