• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread doubt

 
Swapna James
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I came across this question while doing a mock exam



The result is "In run" will be printed out and the execution will stop. Can anybody explain what happens here?

Swapna.
 
Stephen O'Kane
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Swapna,

I don't think i'd bother trying to answer this question, as the suspend() method has been deprecated for quite a long time now, and the question obviously then comes from a very old exam. See

Java API deprecated Thread methods

for an explanation of this.

Sok
 
Swapna James
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sok,

I know about the depreciated methods in Thread. But are you sure that this type of question will not come for SCJP1.4?

Anyway I would like to know what happens in that code.

Swapna.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic