Mikalai Zaikin

Bartender
+ Follow
since Jun 04, 2002
Merit badge: grant badges
Forum Moderator
Mikalai Zaikin currently moderates these forums:
Cows and Likes
Cows
Total received
43
In last 30 days
0
Total given
1
Likes
Total received
311
Received in last 30 days
1
Total given
512
Given in last 30 days
6
Forums and Threads

Recent posts by Mikalai Zaikin


is the same as

I.e. base Object's equals() implementation

To do a logical array comparison you need   method OR
Sorry, I don't know what the book says, I explained the code behavior.
Please check the JEP:  https://openjdk.org/jeps/378
Specifically this part:

Escape sequences aren't translated until after incidental space stripping



So, first the space literal is stripped, making ******, then \s inserted, which gives *** ***
Hi Rajat,

You can check this page https://coderanch.com/wiki/659976/OCPJP-Wall-Fame to see which study source used people who succeeded in passing the exam.

Most people used the Enthuware mock test, which has a closer exam simulation than the book.

It's up to you if you wish to use it.

Good luck,
MZ
Hi Naizak,
The exam does not ask for the number of invalid lines in the code fragment, as this type of question is very ambiguous.

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..;-(
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
could it be related to duplicated periods here:



1 month ago

Aziiz Ahmed wrote:I just earned the certification with 72% , when i open Credly i didn't find the badge.
Oracle certification Badges are no longer being issued from Credly for these credentials.
This mean we just share the https://brm-certification.oracle.com/ ?



Hi Aziiz !

Welcome to CodeRanch !

Yes, Oracle does not support publishing to Credly.
Can you put a breakpoint here:
1 month ago
Hi Anil:

I am glad you use our sample quiz for Java learning.

If you are using ItelliJ Idea (even free Community edition) you can use advanced debugger feature to check how pipeline processes data.

Hope screenshots explain it.
1 month ago
There is one trick here:

Deer.hasHorns access modifier is private.

For this reason, even while we have Reindeer instance (Deer deer = new Reindeer(5);), polymorphism is not working, and code will call Deer's implemenattion, hence "false" is printed   .

Be careful  
Also, we can talk in terms of "recoverability".

The true deadlock (IMHO) can never be recovered.

And the code above can be recovered for example by some daemon threads



which may be ignored (as main thread ends before t1 and / or t2 even started) if we had 12 Runnable like this



but since the main thread is blocked, the daemon threads will always run and will "programmatically" "recover" the situation.

Just 2 cents...