Skip to main content

command line option arrayList in java

1 reply [Last post]
nano22
Offline
Joined: 2008-04-18
Points: 0

Want to take in a list of Array elements from a command line eg Prog1 arg1 arg2 ArrayList in java

Have the following
<code>
String arg1
String arg2;
List<String> arg3;
if(args.size() == 3) {
arg1 = args.get(0);
arg2= args.get(1);
arg3= args.get(2);
</code>
I want arg3 to contain the list of elements Anyy ideas how i can achieve this using the get.args()

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
darrylburke
Offline
Joined: 2010-08-05
Points: 0