command line arguments
How can i check whether my command line argument is a String or Integer or some other .
How can i check whether my command line argument is a String or Integer or some other .
All command-line arguments are strings. If you want to use them as integer values or something else, you'll want to parse them.
~
Command line arguments are always String objects (that's why you get a String[]).
You might want to know wether a specific string contains text that can be interpreted as a number, 'though.
For this you can try Integer.parseInt() and catch a NumberFormatException. If the exception is thrown, it's not a number.