Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Mushfiq Mammadov

Ranch Hand
+ Follow
since Mar 26, 2015
Mushfiq likes ...
IntelliJ IDE Spring Java
Baku, Azerbaijan
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt Green check

Recent posts by Mushfiq Mammadov

Congratulations Jeanne and Scott. I hope this book will be successful as your previous books too  
My question:

Which new topics were added and which topics were modified in this book comparing your previous OCA 8 book?

Campbell Ritchie wrote:Isn't that a good mark Well done.

Thanks a lot, Campbell
11 months ago

Jeanne Boyarsky wrote:Congratulations. Thanks for sharing your scores on the blog. It's helpful for those wondering if they are ready to take the exam.

We didn't cover lines() in the 809 book. We are covering it in the 816 book.

Thanks a lot, Jeanne. I came across ready() method of BufferedReader in exam too. You can add it if you want
11 months ago
I took OCP Java SE 8 (1z0-809) exam on 14.10.2019 and passed with 93%. I have shared my exam story in my blog.
11 months ago
It was required only one option. When I saw E and F (for example) options I thought this is ambiguous. Therefore I looked at question again and looked for compile error or exception probability. But I remember (~80%) that there were no such options, all options contained output. Maybe I missed any tricky point but after review I saw again that correct option should be option E or F.
I learn that groupingBy created HashMap as a result in most cases and the order of elements are unspecified.

Finally I chose option E.. According to exam score report I think it was wrong. It is interesting that option F was correct answer or not.
In real exam I came across question regarding groupingBy() method and was asked the output. There were four options and I removed two wrong options. There were only two correct options which the output were same but the reverse order.

It is comfortable for me to ask my question using the following Enthuware question:


What will the following code print?

A. C# C#
    OCAJP Java, OCPJP Java, OCEJPA Java
B. [C# C#]
    [OCAJP Java, OCPJP Java, OCEJPA Java]
C. [C#]
D. C#

The correct answer is B in this question.
Now you can imagine that there are only two options:

E. [OCAJP Java, OCPJP Java, OCEJPA Java]
    [C# C#]
F. [C# C#]
    [OCAJP Java, OCPJP Java, OCEJPA Java]

Is there any rule to determine the output order? Is output order predictable in advance in this question? Isn't weird to giving these options together at the same time?

Campbell Ritchie wrote:Please always provide full details of where the questions came from, so we can assess the complete question and to reduce copyright problems.

Sorry, I edit the post. Thank you.
These questions are from "OCA/OCP Java SE Programmer Practice Tests" (J.Boyarsky & S.Selikoff) book, Chapter 23 OCP Practice Exam:

Question 44. Given an updatable ResultSet that contains the following and this code, what does the code snippet output?

---table skipped---

A. 0
B. 10
C. The code does not compile.
D. The code compiles but throws an exception at runtime.

In this question it isn't written that ResultSet is scrollable, says only updatable. If ResulSet is not scrollable the correct answer should be D, but the correct answer is A. Maybe "scrollable" was forgotten to be added.

Question 45. Which statements describe a stream class and cannot be applied to a class? (Choose three.)

A. Can be used with try-with-resources statement
B. Includes a class or set of classes used solely for working with character data
C. Requires all data objects to implement Serializable
D. Some classes contain a flush() method.
E. Some classes contain a method to skip over data.
F. Some classes contain a method to sort the data.

Option A is shown as one of the correct answers in book and explanation says that:

Option A is correct because the stream classes implement Closeable and can be used with try-with-resources statements, while does not implement Closeable.

But Stream class implements AutoClosable indirectly and can be used with try-with-resources statements.

Best regards

Stephan van Hulst wrote:A stream is operated on when you call *any* stream operation.

This was helpful. Thank you for your response.

Why this code throws "java.lang.IllegalStateException: stream has already been operated upon or closed" exception? There is no terminal operation here.
Everthing will be ok if I uncomment "line a".

Victor Calin wrote:Hi Mushfiq,

You've mentioned that you took 3 practice exams from SYBEX. I have exactly the same book but the PDF version. However I do not find those 3 exams. Only the assessment test and the exams after each chapter.
It's possible you misted up the books and those 3 exams are elsewhere ?
Thank you,

Hi Victor,

Practice exams is not included in book, it is online material of SYBEX. Please, look at the paragraph "Free Online Learning Environment" on page XXVI, there is information about it.
2 years ago