Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFS page 344 error?

 
pallavi utukuri
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there's a servlet code on page 344

foo.Person p = new foo.Person();
p.setName("evan");

and the Person class is given on page 352 which is an
abstact class soo
foo.Person p = new foo.Person();
creates error saying its abstract and cant be instantiated

this must be an error ryt?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy -- on page 352 we *change* it to become abstract (second sentence in the middle paragraph says, "We'll change the Person class to make it abstract...").

But we didn't make it very clear, so it's our fault for making it confusing.

So on page 344, class Person is not specified as abstract, but on page 352, we change it to abstract to demonstrate polymorphic references using <jsp:useBean>.

We should have made it more obvious, especially since we don't actually *show* the Person code on page 344.

Anyway, thanks for pointing this out and we'll make a note to try to make that more obvious in the next version.

cheers,
Kathy
 
pallavi utukuri
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic