This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The Sierra/Bates book says it mostly follows camelCase rules and that the SCJP exam will - I was somewhat confused by the sample question in chapter 3 (it's already been posted on these boards, so I'll omit the code). The question defines a class named Fizz containing a static method named FizzSwitch. It was my understanding the method should start lowercase?
I wouldn't concentrate so much on that - mostly still allows for a 'slip' now and again. While most methods you'll see written in Java are going to start with a lower-case letter (camel-case), the compiler will accept upper-case letters at the start of methods. It's entirely legal.
Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
I can't remember exactly what we were going for with that question, but I can say that sometimes you'll find the code in the real exam questions that doesn't follow normal conventions. The fact is that normal conventions help make code more readable, and sometimes when we write exam questions we don't want to give certain clues to what's going on in the code.
So again, I'm not sure if that was what was going on with this question, but I can say that you might see stuff like this on the real exam.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)