Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCJA exam strategy "will it compile" vs. "follows naming convention"

 
Adam Confino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Java Gurus,

I am feverishly preparing for the SCJA exam and have a "rule of thumb" question.

Some of the practice questions in Cameron McKenzie's book test whether you know if sample code will compile\run, even if it doesn't look pretty. In a few of the practice questions, I also noticed that answers were eliminated because they didn't follow name conventions, but would compile (i.e. Mock Exam Questions, pg. 77, answer 3-19).

So if a possible answer does not follow naming convention, but will compile, should it be thought of as correct or incorrect? Does Sun provide any guidance on the issue?

Let me also say that Cameron's books have been extremely helpful and my post is in no way a dig at him.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much for the kind words. I didn't take them as anything but complimentary!

Indeed, many exam questions skip the 'conventions', but it's often just to save space it would appear. Don't think the lack of a getter or setter might imply that Sun wants you to say the code is bad or does not compile. Indeed, it will compile!

So, don't be surprised at code snippets that avoid naming conventions. If indeed they are quizing you about the topic of naming conventions, one of the answers will deal explicitly with the topic.

-Cameron McKenzie
 
Adam Confino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Cameron...your help made my day!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic