You have code lines that assume that there are at least 3 arguments before you check how many arguments there are. Move these lines:
// setting up the variable firstNumber and secondNumber
int firstNumber = Integer.parseInt(args[0]);
int secondNumber = Integer.parseInt(args[1]);
String arithmetic = args[2];
below your "!= 3" check. Otherwise if you enter less than 3 command line arguments, you'll get an ArrayIndexOutOfBoundsException
on one of those lines before you check how many arguments you have.