The error is pretty explicit:
ArrayIndexOutOfBoundsException: 6 at SwitchDemo.main(SwitchDemo.java:5)
So look at line 5 and you see:
int marks = Integer.parseInt(args[6]);
Did you provide any arguments when you ran the application?
Did you provide seven arguments (remember, java array indexes start at zero, not one, so the sixth argument is at index 5)?
I'd strongly suggest you check the number of arguments passed, and report a problem to the user if he didn't provide enough when he runs your app:
int argCount = args.length;
Will tell you how many were passed.