Parameter 0: stringA Parameter 1: stringB Parameter 2: stringC
(Ignore this page if you are not using BlueJ.)
BlueJ allows you to enter command line parameters in a dialog window.
When you start main
in the usual way,
Edit the command line in the dialog box and then hit enter:
Edit the dialog box so it contains an array of references to string literals:
{"arg1", "arg2", "arg3"}
This is the array that would be created from the command prompt if you entered
C:\>java StringDemo arg1 arg2 arg3
from the command line.
Say that the user started this program with the command line:
C:\>java StringDemo 123 0045.7
What does the program print?