About Question enthuware.ocpjp.v17.2.3753 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
shwetagulati
Posts: 5
Joined: Thu Dec 29, 2022 1:33 am
Contact:

About Question enthuware.ocpjp.v17.2.3753 :

Post by shwetagulati »

Calling interrupt on a thread that it is in TIMED_WAITING or WAITING or BLOCKED state causes an interrupted exception? is that true?


or in simple words which are all the states in which if a thread is, , can cause interrupted exception on calling interrupt?

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v17.2.3753 :

Post by admin »

TIMED_WAITING or WAITING or BLOCKED


mellester
Posts: 1
Joined: Mon Nov 27, 2023 5:20 am
Contact:

Re: About Question enthuware.ocpjp.v17.2.3753 :

Post by mellester »

I get that a thread that is running does not get a InterruptedException.

However in this question a interrupt is fired 300 mile seconds after T1 is started there must be something really weird going on if T1 is not always in waiting at that time.
Can I just not reason with these time frames.

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v17.2.3753 :

Post by admin »

Not sure I understand your question. Can you please rephrase?

raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

Re: About Question enthuware.ocpjp.v17.2.3753 :

Post by raphaelzintec »

very good explanation but you dont explain why T1 RUNNABLE can be printed only 1 time, you explain 3 options with T1 RUNNABLE printed two times

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v17.2.3753 :

Post by admin »

Not sure what I understand your doubt. If you are clear that T1 RUNNABLE can be printed two times, doesn't that mean T1 RUNNABLE cannot be printed only 1 time?

Post Reply

Who is online

Users browsing this forum: nkaragulov and 10 guests