Janet Smith wrote:I'm using the OCA/OCP Java SE7 Programmer I and II Study guide by Kathy Sierra and Bert Bates.
Janet Smith wrote:One in particular that I'm looking back at today is in the 1st Self Test:
Janet Smith wrote:This isn't the first time I've come across 'interesting' syntax in a test that is not mentioned, or is only covered by a single line in the book.
Janet Smith wrote:So my question is how to deal with things like this? Are there other sources I should be using in preparation for the test that might cover things like this? Possibly the Mala Gupta book? Or different online resources? I haven't downloaded the Enthuware tests yet because I don't want to tackle them until I'm more confident i.e. I don't want to waste them. I'm guessing a lot more coding would be a good idea. But its the fact that I don't know that these types of syntaxes exist in the first place, so how to know to use them in my own code is the question.
Stefan Evans wrote:Just wondering what is the context of this code?
Roel De Nijs wrote:
This question is more about the very weird identifiers (class name, variable name and parameter name) than about the for loop itself.
Janet Smith wrote:The rest of the question made sense and I was able to work it out. It was just when I saw the unusual loop I wasn't sure if it was valid. So I wasn't 100% sure whether my answer was correct or if it was going to have a problem during compilation or at runtime.