About Question enthuware.ocajp.i.v7.2.1335 :
Posted: Wed Dec 12, 2012 11:31 am
for k = 4, the explanations says that after after taking control to case 4:, all the statements till the end will be executed and j will be incremented 3 times:
case 4: j++
case 5: j++
default: j++
I don't understand why j would be incremented for case 5: since k!=5
Shouldn't j be incremented only twice for:
case 4:j++
default: j++
in this case the answer should be j + k = 7?
case 4: j++
case 5: j++
default: j++
I don't understand why j would be incremented for case 5: since k!=5
Shouldn't j be incremented only twice for:
case 4:j++
default: j++
in this case the answer should be j + k = 7?