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...
Type: Posts; User: GregBrannon
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...
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? ...
Lighten up. Don't take yourself so seriously.