Search:

Type: Posts; User: GregBrannon

Search: Search took 0.08 seconds.

  1. Replies
    9
    Views
    1,501

    Re: too many if's and else's!

    Oh, and you missed the solution posted by Sambit. Too bad.

    As you've correctly pointed out, this statement:

    if ( args[i].matches("[a]*") && args[i].matches("[b]*") )

    is the problem. Since...
  2. Replies
    9
    Views
    1,501

    Re: too many if's and else's!

    The first if only checks one args[] element at a time each time through the for loop. Finding a or b anywhere in the array args[] can't happen with the statement as it's written. Can you see that? ...
  3. Replies
    9
    Views
    1,501

    Re: too many if's and else's!

    Lighten up. Don't take yourself so seriously.
Results 1 to 3 of 3