This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assessment Test For OCAJP 8 Programmer 1

 
Mike Rithgen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book mentions it will provide line numbers for code samples so you know if you're looking at a snippet or the entire contents of the source.
Question 2:  No line numbers for code so I assumed it would not compile.
Question 7 : No line numbers for code so I assumed it would not compile.
Question 15 : No line numbers but the choices you're given imply that it's ok in this case.
 
Ganesh Patekar
Bartender
Posts: 696
23
Eclipse IDE Hibernate Java jQuery MySQL Database Netbeans IDE Oracle Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Which book are you referring to? can you please QuoteYourSources
 
Narayana Bojja
Ranch Hand
Posts: 135
4
Hibernate Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike Rithgen,
Warm Welcome to Coderanch .
The book mentions it will provide line numbers for code samples so you know if you're looking at a snippet or the entire contents of the source. 

If the question tests to find compile time error at particular line, it may contain line numbers  to ask you at what line compile time error occurs ?
Some questions ask you to select output then what is the need to have line numbers If code doesn't contain compile time errors.
There is no specific rule that "Code should contain line numbers ". Remember line numbers are not part of code snippet. Read and understand the question properly when you are answering the question.

Hope it helps !
 
Ganesh Patekar
Bartender
Posts: 696
23
Eclipse IDE Hibernate Java jQuery MySQL Database Netbeans IDE Oracle Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm not wrong, you're referring to OCA 8 Sybex. As Narayana mentioned It is not necessary all code snippet to have line numbers. It depends on questions and their options provided.

Some questions are provided with output options and one of them can be The code doesn't compile. It's in Question 2 in that case there is no need to provide line number. Same for Q7.

If the question had options asking specific line of code causes compile time error having options like Compiler error on line 2 Or The code will not compile because of line 3 etc. in that case code snippet may have line numbers as like Question 1 in Assessment Test.
 
Mike Rithgen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply guys. 
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
After the book came out, Oracle decided to ditch this. Now you get to assume code is a snippet even without the line numbers. So you don't have to hunt down missing imports. Yay!

In other words, don't think too much about this as you won't have to on the real exam.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic