if ( args.length != 3 || !args[1].toUpperCase().equals("TO") ) { System.out.println("java CopyBytes source to destination"); return; }
The above is the only correct answer, given the choices.
The args.length != 3
must come first.
If it is true, then the short-circuit OR immediately
evaluates to true
and there is no
danger of trying to look at a non-existent args[1]
.
If the order were reversed (or if a non-short-circuit OR where used),
then the if
might throw an
ArrayIndexOutOfBoundsException
.