Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    You should check the length of args[i]! Commented Sep 7, 2011 at 23:52
  • I was just typing that in! You could also use a hash table instead of a switch statement if you'd like to be fancy. Commented Sep 7, 2011 at 23:52
  • What do you mean by "-flag opt combination"? Do you mean a dash character followed by any number of chars? Commented Sep 8, 2011 at 18:18
  • 2
    Ok, ill accept this as the answer although I think optsLists should be converted to HashMap . Commented Sep 8, 2011 at 18:57
  • In for loop you need to initialize the iterator (int i = 0;), otherwise compiler yells at this (Java 7). Commented Nov 17, 2013 at 23:15