Originally posted by: m0ti
You can use:
the .length() function of String.
You have to differentiate between a String object that you have access to and one that you do not.
In your example, you'd have a mian that looks like this:
static public void main(String[] args) {
}
You must check that args.length isn't 0 to know if a string was passed as a parameter to the program. After that you can check args[0].length() (though you shouldn't have to. As far as I know no empty strings can be passed in from the command line).