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

Question about Twist in the Tale 1.2 (Mala Gupta)

 
alan white
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a question regarding Mala Gupta's book. In section 1 - A twist in the tale 1.2 we are asked
to choose which answers are correct.

One of the answers given as correct is:
Changing the class Car to a non-public class will compile the code.

I have tried this but it still won't compile. I've tried looking for the book errata given in another answer
but can't find it in the link provided.

The code is:

Any suggestions

Alan

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alan,
Welcome to CodeRanch! I've added [ code ] tags to make your post easier to read.

In the code in the book*, this isn't included:


* I'm looking at an older version of the book since I tech proofread it. Can you double check to see if that code really is there? (And if it is, remove it as it shouldn't be.)

That's why your code doesn't compile. Multiple2 is defined twice by mistake.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just had a look to the Twist in the Tale 1.2 of Mala Gupta's book.

This is the provided code snippet for this exercise:

So if you start from the above code and you change the Car class a to a non-public class, the code will definitely compile.

Hope it helps!
Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic