Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Errata K&B OCP 7 p. 557  RSS feed

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Two-thirds of the way down page 557 in the third line of class Student, shouldn't new BookDao() be new InMemoryBookDao()?

BookDao dao = new BookDao(); // current
should be:
BookDao dao = new InMemoryBookDao(); // proposed

As per the next page, 558, BookDao is an interface, which can't be instantiated,  and as per the class at the top of 557 the class is InMemoryBookDao.

Just wondering.

m.
 
Marshal
Posts: 62259
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are right; I cannot unfortunately find the errata on the publisher's website so I don't know whether that has been reported before.
 
Mark Kevin
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I can't find the publisher's website errata page either, but it hasn't been listed on coderanch's errata page. Also, it would make much more sense and be clearer if the interface snippet BookDao on p. 558 directly preceded class Student on page 557. It really threw me off.
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!