About Question com.enthuware.ets.scjp.v6.2.692 :
Posted: Tue Dec 01, 2015 6:39 am
It's not really clear to my why option 4 is not correct. The question stands that if no arguments are given (so assuming args.length = 0), the code should exit without output or exception.
But for that condition is the int = -1 and it will never pass to SYSO, because this -1 > 0 is false.
Why is there answer: "if there is only one argument i will be 1-1 = 0" when the question stands for "no arguments are given"?
But for that condition is the int = -1 and it will never pass to SYSO, because this -1 > 0 is false.
Why is there answer: "if there is only one argument i will be 1-1 = 0" when the question stands for "no arguments are given"?