Sébastien Canonica

Greenhorn
+ Follow
since Feb 02, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
4
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sébastien Canonica

I passed the exam about a month ago, and the only bad surprise I had was with JDBC.
There were a question with the moveToInsertRow (and updateRow maybe) method, and another one with the setMaxRows method. Maybe there was another trick in these questions, or maybe they were unscored, I couldn't know...
I didn't notice any other gap. I did all the Enthuware tests, learning along the way the items that were uncovered (although much more superficially) so I may have not noticed something else. I'm pretty sure Enthuware had a question with at least one of these JDBC methods.
It is definitely not a deal-breaker for me. But spending a bit more time on Enthuware JDBC questions might be a good idea.
Hi everyone,

A few days ago, I passed the OCP Java SE 8 exam. The preparation of the exam took me about 3 months and it went very smoothly with all those great resources available.

  • First and foremost, Jeanne and Scott's books are truly great and spot-on. In addition to being great teachers, the insights given about the exam objectives as well as the common "tricks and traps" from the examinators are a must have for an efficient preparation. The review questions and mock exams were numerous, hard and full of subtleties, just like they should be. So a huge thank you and congratulations to both of you for these fine guides!
  • As I have not a lot of Java experience (but plenty of C++ and JS), I followed Jeanne and Scott advice and, whenever I had a doubt about how something worked, I wrote programs using notepad and the command line. It helped a lot in "muscularly memorizing" the precise syntax. Another good method is, when doing the mock questions, to really read out in your head (subvocalizing) the code snippets ; after a while, you can detect when the code "sounds" bad.
  • I've been mostly lurking on the coderanch forums, in the beginning for the erratas, and then for more general questions. A big thank you to all participants.
  • Finally, after studying the book, I used the Enthuware mock exams. I did them all (which took quite a bit of time..). The great things about these tests is that they better represent the actual exam taking experience: there are the full 85 questions in most exams (so I was able to work my endurance and how to manage time), the number of correct answers for a question is known and there is a strike-out feature (so I practiced my "unprofessional guessing" skill). And with the sheer number of questions available, taking the test soon becomes second nature. An interesting aspect of Enthuware is that there a certain number of very obscure questions that felt sometimes out of scope. But at least, you get prepared for that and learn to move on (as well as learning about a few more dark corners of Java when you're reviewing the answers...). And the price is a steal. So a big thank you to the Enthuware team.


  • I did had a passing score in all the mock tests (except for the assessment tests - a very humbling experience), but it wasn't stellar. I found the actual exam to be way easier. The only surprise I had was with JDBC: there were questions about moveToInsertRow and setMaxRows which are not covered in Jeanne and Scott's book. Enthuware went deeper in this area.

    I hadn't reported about it, but I had used the same preparation plan for the OCA last year (took me about 2 months and scored 98%). It might not be the most original method (actually, I took it from the ranch!), but in both cases it was efficient, enriching, and, dare I say, fun!

    So again, a big thank you to you all. And gook luck to all aspiring OCA & OCP!
    And now is the time for me to stock up on belgian beer!
    7 years ago
    Hi,

    In the mock exam 2, there is a question about the usage of instanceof on some Furry, Chipmunk and FurryChipmunk interfaces and classes. The last 2 possible answers do not match the code snippet.

    Thanks
    Hi,

    In the assessment test, question 14 uses the Scanner class. Is the Scanner class part of the exam objectives?

    Thanks
    Hi,

    I think I've spotted some errors in the flashcards.

    Set 2 card 63: "Name two java.io low-level stream classes used to read file data directly." The answer given is "FileInputStream and FileWriter". It should be "FileOutputStream and FileWriter"

    Set 2 card 72: the answer talks about "The Files factory class". The term "factory" seems odd to me. The book presents it as an helper class.

    Set 3 card 39: I agree that 2016–03–14T07:00–05:00 is 12:00 GMT and that 2016–03–14T08:00+06:00 is 2:00 GMT. But I don't see how the first is 2 hours earliers. For me, it is the 2nd one which is earlier by 10 hours. 12:00 GMT means noon, not midnight.

    Set 3 card 64: "Name the two java.io stream classes used to improve performance when writing data to sequential disk-based systems." The answer given is "BufferedInputStream and FileWriter". It should be "BufferedOutputStream and FileWriter".

    By the way, the errors on Set 2, cards 2 and 42 have been fixed by the test vendor.

    Thanks
    I tried with the following main method:

    The output is


    The 2 values seems instantiated when the enum class is initialized. Is it your issue ?
    Hi,

    On page 543, question 17 is missing the "Choose all that apply". In the online version, the sentence is missing as well, but it displays check boxes instead of radio buttons, so it's less distracting.

    Thanks
    Hi,

    Chapter 8 on the IO APIs makes several references on page 434 and 439 to the String.format method, and points to Chapter 5 for further details. But I wasn't able to find these details...
    Are the format method and formatting string syntax part of the exam ?

    Thanks
    This explanation about the password being potentially stored in the pool bothered me as well, as it seems to contradict the OCA material, especially regarding the behavior of the == operator between literal strings and "dynamic" strings.
    I think I understand it better with Paul's explanation.

    Literals strings are put in the pool. Dynamic strings can be put in the pool with the intern() method ; if the string already exists in the pool, intern() returns the instance in the pool. So the password shouldn't be in the pool, unless we explicitly put it in.

    But, even if we don't internalized it, from a physical memory point of view, the string instance is still somewhere. As it is immutable, the Java program has no way to erase or scramble it.
    When the string stops being referenced in the Java program, it becomes eligible for garbage collection, but is still physically in the memory. And even if it is garbage collected, depending on the JVM implementation, I guess it doesn't necessarily mean that the corresponding physical memory is reset ; it just had to made available for a future allocation. And that's when a new object is allocated in these memory adresses than the bits will be reset. So the string can stay a very long time in the process memory.
    Using a char array is the only way for the Java program to voluntarily, and in a timely fashion, overwrite the password in the memory.

    Hi,

    I think I found some minor typos in Chapter 2 and 3.

    Chapter 2, p 100, Q 13, answer B : I think it's missing an "are" in "All of the instance variables are marked ...". Same problem in the online version.


    Chapter 3

    P 129 second-last paragraph : it should refer to Chapter 7 (Concurrency) instead of Chapter 8 (IO)

    P 130 table 3.4 : the add(E element) method should have a boolean return type. The remove(int index) method should have a E return type.

    P 144-145 : I think the errata could be a bit more comprehensive regarding the package of the Comparable interface. Mike has spotted it 3 times in its original post:
    - unnecessary import on the code sample p 143
    - wrong code sample on the LegacyDuck code sample p 145
    - wrong paragraph at the bottom of p 145
    There is also the same error in the Animal code sample at the bottom of p 144

    P 164 Q 9: although not technically an error and not something that could happen at the real exam, shouldn't it be a "Choose all that apply" question for extra trickiness ?

    In the errata list, p 159 should refer to Chapter 3 instead of Chapter 4

    Thanks
    Hi,

    In the very funny chapter 10, on page 543, question 15, the code snippet is missing. The online material doesn't have this problem.

    Thanks
    Hi,

    I found 2 small typos in chapter 8.

    P 406, "Conceptualizing the File System", at the start of the 2nd paragraph, I think it's missing an "a" : "A file is a record within..."

    P 441, top paragraph, it should reference the "console.reader() object". There is no method read on Console.

    Thanks
    Hi,
    I think I've spotted some typos in Chapter 9

    P 456, last line : the file package should not have an "s"

    ... the java.nio.files.Paths factory ...



    P 457, first line : Paths has no getPath method, but get methods. This typo is made several times through this chapter.

    P 459, Path.getPath() should be Paths.get()

    P 463, I'm not sure about the explanation about the PrintWriter being the cause of the call to the toString() method. I would say the string concatenation "+" triggers it first.

    P 470, the toRealPath method does not have a Path argument, it's an instance method.

    P 489, in the bottom note, it should be "that can be stored in a int" instead of stopped.

    P 500 and 570, question 12. I tested answer C and although it compiles, it throws an IllegalArgumentExeption: Missing scheme exception. So I think it should be a correct answer.
    Also as noted by Mihaela Hetea in another thread, answer G use a Paths.getPath method which doesn't exists so it should be a correct answer as well. The answer explanation for D and G talks about optional varargs values, which are nowhere to be found.

    Thanks