Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

K&B Page 499 ??

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
=================
The following code does not start a new thread of execution:
Runnable r = new Runnable();
r.run(); // Legal, but does not start a separate thread
=================
Isn't this wrong - How can u instantiate a interface.
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right, Sopal - that line is incorrect. However, I think the point they're trying to make is that you can't create a new thread of execution without a Thread object - you can't do it with a Runnable object alone.
I hope that helps,
Corey
 
sopal Pal
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I know the point they are trying to make, but my opinion is that the example is wrongly chosen.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let them know about it. They post all of the "fixes" to the book on:
http://www.headfirstjava.com/SCJPStudyGuide/StudyGuideIndex.html
I received an email from Kathy a couple of days ago. She's very concerned about the books she writes in that she wants to make them as good as possible... So if you feel that this is confusing to you, write her and let her know about it. I'm quite sure she'll consider the suggestion.
 
Dean Jones
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or Bert too... I just have a secret crush on Kathy...
Shhh... Don't tell anyone.
 
author
Posts: 9000
19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sopal, Corey, and Dean,
Well you found an errata! It's getting tougher, most of them have already been discovered! Corey is correct about our intention.
In general, we'd prefer that you email any errata concerns to us because we can't guarantee that we'll always check every JavaRanch thread. (In this case you did email us, which is great!)
It turns out that while Kathy is indeed WAY cuter than me, she's the one who created this particular error, so I guess you just have a tough choice... about who to contact.
-Bert
 
reply
    Bookmark Topic Watch Topic
  • New Topic