I'm writing a program whereby I'm accepting input form the keyboard, converting it to a String, and then displaying it. Firstly however, I want to check whether the inputted value comprises more than 1 charcater or not. I've done the following :-
In other words, if I enter the value '22' at the keyboard, because it comprises of more than one digit, i want the program to print "two digits present!". But it doesn't work - nothing happens. What am I doing wrong here? [ December 23, 2002: Message edited by: Marilyn de Queiroz ]
John Bonham was stronger, but Keith Moon was faster.
args is an array with all command line arguments (however many there are). args is the String representing the first argument (if there is one). So you want to look at args.length() rather than args.length. Of course, make sure args.length > 0 before trying to access args.