The size depends on the parameters passed in thecommand line, you can get it (as with all the arrays)with the length variable:int size = args.length;