Anything you type on the command line is just text. Even if you type a string that looks like a number it is just text and gets stored into the args array that gets passed into main. If you want to use that token as a number you have to convert it to an int using the Integer class which contains methods named .parseInt() .parseDouble() .parseBoolean() etc. for each primative data type to covert a String into