Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Does the OCAJP use identation or not ?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

Question is in the title, I see a lot of mock questions not use the indentation.
Is it a thing ?
 
Bartender
Posts: 3647
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be prepared to different styles of code: e.g. a very long lines of pipelines, or several statements in a single line, or tricky indentation.

Assume such code:



(hopefully you were not tricked 8-)
 
Robin Louis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer, not every question will be an indentation trick tho, right ?

Because every question in a book i'm reading just omits indentation, like the following question

What is the result of the following code?

so I wonder if every question will be like that or if it is intended to train me to the indentation type of questions.
That doesn't bother me that much for that question but when there is much more code that's kind of hard to read when the point of the question isn't even reading correctly the indentation
 
Enthuware Software Support
Posts: 4453
41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Robin Louis wrote:Thanks for the answer, not every question will be an indentation trick tho, right ?


No, not every question but you won't know which one is trying to trip you on that. Mostly, the if/else questions is where you have to be more careful.


Because every question in a book i'm reading just omits indentation, like the following question


If it is an ebook, it could be a formatting issue with the book or the ebook reader s/w. Which book is it?
 
Robin Louis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Anilprem wrote:

Robin Louis wrote:Thanks for the answer, not every question will be an indentation trick tho, right ?


No, not every question but you won't know which one is trying to trip you on that. Mostly, the if/else questions is where you have to be more careful.


Because every question in a book i'm reading just omits indentation, like the following question


If it is an ebook, it could be a formatting issue with the book or the ebook reader s/w. Which book is it?



The online exams included with "OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide : Exam 1Z0-808" written by Jeanne Boyarski and Scott Selikoff.
They do indent the questions in the book though, it's only the online questions that have absolutely no indentation. Maybe it's not on purpose, I don't really know.
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Robin,
Not on purpose. The PDFs we reviewed and the printed book all have indentation. The Kindle book "lost" it. We don't know why.
 
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Robin,
Not on purpose. The PDFs we reviewed and the printed book all have indentation. The Kindle book "lost" it. We don't know why.


If kindle version is on .mobi format, i think this format lets the device calculate 'landscape' of text based on letter size and free space, making indentation a mess.
Try pdf version on Kindle (of course, loosing this auto-fit capability).

But this, far from a handicap, could be an advantage. If you can read code without indent, your chances to read it properly (and understand it) on exam increases.
 
Robin Louis
Greenhorn
Posts: 12
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Robin,
Not on purpose. The PDFs we reviewed and the printed book all have indentation. The Kindle book "lost" it. We don't know why.



Thanks a lot for your answer !

My OCAJP is scheduled for the 18/06, I'll let you know if that crazy indentation made me the OCAJP big boss.

Have a great day everyone.
 
Robin Louis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone, I scored my OCA.
I'm aiming for the OCP now.
Is the "OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide: Exam 1Z0-809 Book by Jeanne Boyarsky and Scott Selikoff" of 2016 still up to date with the current OCP ?
And is the selikoff.net/ocp still up to date ?

Thanks you everyone and have a great day.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic