I'm currently reviewing for my OCPJP 6 using the Sierra & Bates reviewer. I stumbled upon a question regarding an endless loop not throwing a StackOverflowError. As far as I've learned, it should throw it eventually.
Please refer to this PDF for the question: https://java.net/downloads/jfjug/SCJP%20Sun%20Certified%20Programmer%20for%20Java%206-0071591060.pdf
Question I'm referring to is from Self Test Chapter 5 Question 9 (page 455 of the PDF).
I answered, CDF. The correct answer, according to the book was DF. It was also explained in there that case 0 initiates an endless loop, not a StackOverflowError.
True, it does initiate an endless loop, but eventually turn out to be a StackOverflowError. The answer C stated "might throw a StackOverflowError" so I knew C was correct.
If I'm wrong, can anybody explain why?