• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Cameron...your help made my day!
 
Your mother is a hamster and your father smells of tiny ads!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic