• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Failed OCP 1Z0-829. 66%

 
Ranch Foreman
Posts: 662
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My voucher was expiring tomorrow and so I did the exam and failed. 66%

There was one concept I did not know at all:
If A is serializable and B extends A then is B also serializable?
I do not remember seeing that covered in the Boyarsky-Selikoff book.
So, when it is written to a file and then read again, are B's members also read in?

I have spent 8 months now doing this in full-time preparation.
It should not be so hard for just a programming language that I have gotten certified in before but that was 20 years ago.

This is exhausting. I will try once more within the next month and if I fail again, I will give up...
 
Marshal
Posts: 28296
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have great sympathy with you. I wouldn't want to learn in an environment where you have to answer every question immediately, as throughout my career I could always say "Oh. How does that work again? Let me just write a quick code example to find out." Still, it seems like that's the way it is these days. I wish you luck for the next time.

As for Serializable, if X inherits from Y and Y inherits from Z then X inherits from Z. This is true for all classes and interfaces including Serializable.
 
Anil Philip
Ranch Foreman
Posts: 662
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are the resources I have been using:
1) Boyarsky-Selikoff Java 17 certification study guide
Read this over and over again.
2) Boyarsky-Selikoff Java 17 certification Practice Test Questions
Completed almost all of them. I do not recommend it at all as many of them are very convoluted and are not like the real exam.
3) Enthuware Mock Exams for Java 17 certification.
Recently purchased it and have started doing the mock exams.
 
Anil Philip
Ranch Foreman
Posts: 662
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:
As for Serializable, if X inherits from Y and Y inherits from Z then X inherits from Z. This is true for all classes and interfaces including Serializable.



Yes, but I did not know that the members of B will also be automatically serialized and deserialized just because the ancestor of B was serializable. It was not obvious to me.
 
Marshal
Posts: 79707
381
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry to hear of your misfortune there. Thank you for giving us more information.
 
Saloon Keeper
Posts: 3929
43
  • Likes 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anil !

Sorry to hear you failed.

I tend to agree with you that modern Java exams more difficult than older. Maybe because scope has increased significantly, or Oracle has different understanding than Sun Microsystems how exam should look like.

Let me quote your word which I think led to the failure:

Anil Philip wrote:
Recently purchased it and have started doing the mock exams.



I am pretty much sure if you took all exams from Enthuware and read all explanations your chances to pass would be much higher.

Regarding serialization -- if parent class is serializable, then all subsclasses are serializable too. The only limitation -- new attributes in sub-class also must be serializable in order to serialize successfully.

There is an often question -- why would not Object is done serializable and then all classes wil be serializable too, and the answer is because there are some classes like Threads, Sockets which should not be serializable (does not make sense), and therefore  it's dangerous to apply Serializable to Object. But, most of Java classes representing values: primitive wrappers (e.g. Integer), String, Date, Date/Time API (Instant, Duration) are serializable.

Take care and good luck,
MZ
 
Paul Clapham
Marshal
Posts: 28296
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anil Philip wrote:Yes, but I did not know that the members of B will also be automatically serialized and deserialized just because the ancestor of B was serializable. It was not obvious to me.



Perhaps if you get into the habit of thinking something like "This object is Serializable" if it belongs to a class which implements Serializable that would help. It's a common way of interpreting inheritance; for example if variable "sender" has a declared type of FileOutputStream you can say "sender is an OutputStream".

And if you think about how serialization works, it must be the case that the serialization process gets an object and asks "Is this object serializable"? It has no way of telling whether the object's declared type specifically declared that it implemented Serializable or whether it's a subclass of something else which specifically implemented Serializable.
 
Paul Clapham
Marshal
Posts: 28296
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:And if you think about how serialization works...

Although yes, it's hard to do that when under exam pressure!
 
Author
Posts: 310
12
Scala IntelliJ IDE Netbeans IDE Python Java Ubuntu Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry to hear this news Anil, i know you've worked hard on this for a while now, and clearly you were pretty close. Certainly one of my concerns with the current exam is that it's decidedly time constrained which puts pressure on folks and means they can flunk this for reasons that have little or nothing to do with their actual knowledge.

Please correct me if I'm wrong, but expect you only got one question on Serialization? I've not heard of more than that showing up to date. That would mean there are other topics that are likely to reward your study time much more highly than this one. The core language, and all the subtleties of it, are central to most questions, even some that appear to be about library features.

Beyond that, I'm running my cert study class on the O'Reilly platform again on the 20th through the 22nd, and you're welcome of course, to bring any other questions that you might have to that. I know I've ducked serialization in most of the runnings of that course, simply because I'm pretty certain you'll only see one question. My pre-recorded course covers serialization in detail, however, so that's another option for you if you decide you want to spend your time there.

https://learning.oreilly.com/live-events/java-se-17-developer-1z0-829-crash-course/0636920079000/

https://learning.oreilly.com/course/java-se-17/9780138194796/

A final thought is that there should be (one presumes!) a Java 21 exam somewhere in the works, and they could reasonably be expected to drop stuff like serialization (just a guess, but the core team doesn't like the feature), and they'll surely drop all the security manager stuff. Then again, you'll be dealing with a new exam nobody understands yet, so perhaps that's not a smart choice after all.

Good luck with your next steps...
 
Anil Philip
Ranch Foreman
Posts: 662
3
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Simon Roberts wrote:
Please correct me if I'm wrong, but expect you only got one question on Serialization? I've not heard of more than that showing up to date. That would mean there are other topics that are likely to reward your study time much more highly than this one. The core language, and all the subtleties of it, are central to most questions, even some that appear to be about library features.
Good luck with your next steps...



Thank you all!
My memory is fuzzy now (5 days later), but
1) I believe there were 3 serialization questions.
2) There were 3 questions on modules.
3) There were probably 3 questions on sealed classes
4) There was one strange question on localization. I have forgotten the details, but it was a corner case which I never saw before.
5) There was a weird question on the exam for which there was no "none of the above" option.
The docs say it is undefined. But there was no such option. There were options like 1, -1, 2, 3...        
unless I misread it, this was an incorrect question.
Something like: what is the output?
// binary search on unsorted list        
var array = List.of(1,3,2);
       int i = Collections.binarySearch(array,3);
       System.out.println(i);

when I run it on my computer it consistently prints 1 - so I wonder when there are very few members in the list,
then a linear search is done?

The proctoring was a little unsettling.
There was no way to contact the proctor, no chat window, nor did they ask me to move my camera around the room to check everything was clean.
I needed to use the bathroom and I spoke to the camera and told them but there was no reply, no chat so after a bit,
I just got up and left to go to the bathroom.

 
Anil Philip
Ranch Foreman
Posts: 662
3
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mikalai Zaikin wrote:
Let me quote your word which I think led to the failure:

Anil Philip wrote:
Recently purchased it and have started doing the mock exams.


I am pretty much sure if you took all exams from Enthuware and read all explanations your chances to pass would be much higher.
Take care and good luck,
MZ



Thank you! (but I did about 1000 practice test questions from the Boyarsky-Selikoff PT book)
Also please see my post above on the unsorted binary search question.
 
Anil Philip
Ranch Foreman
Posts: 662
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forgot to add:
6) There were at least 2 questions on records.
 
Simon Roberts
Author
Posts: 310
12
Scala IntelliJ IDE Netbeans IDE Python Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your list of questions you saw is interesting Anil. I'm very surprised. However, I will note that this exam *frequently* dresses up a question to *look like* it's about one thing (e.g. marking a class Serializable) when that aspect has nothing to do with the actual point of the question. In a sense, I suppose, there is an element of it in there, since you must know enough to know that it's not relevant. But the real point is often elsewhere. That said, I can't know for sure, since I can't take it again ...

On the topic of the (well known--I've been talking about it in my live classes ever since the exam came out) bogus question on a binary search on an unsorted list I can only make the two comments I make every time in my live class, which are:

1) yup, the question is bogus, the documentation *clearly* states that the result is undefined
2) if you understand how a binary search works, you will get the right answer (and that answer will match what the actual implementation gives).

Neither of those two observations alleviate the fact that it's a bad question that has been reported many times--I thought you'd been in my classes, no? I guess I didn't say it clearly enough. A good remind that just because a teacher says something doesn't mean that a learner hears it, never mind understands it.

 
Simon Roberts
Author
Posts: 310
12
Scala IntelliJ IDE Netbeans IDE Python Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, and the reason your example prints 1 every time is that a binary search always starts at the middle. So it succeeds immediately. The real question fails to find the item that's sought, even though it's in the list, and instead reports the position it "should be" at, using the negative numbering documented for the binary search operation.
 
Mikalai Zaikin
Saloon Keeper
Posts: 3929
43
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anil Philip wrote:
Thank you! (but I did about 1000 practice test questions from the Boyarsky-Selikoff PT book)
Also please see my post above on the unsorted binary search question.



IMHO, Enthuware questions more closely follow pattern of the real exam...
Regrding binary search in the unsorted list -- I have reported this question, as far as I know it was addressed, but for some reason not updated in the question bank..;-(
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic