The error means String[] args is empty but you're trying to get values from it. Even if String[] args contained something that could be converted to an integer, you would still receive compiler...