The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jmgimeno (69) [Avatar] Offline
#1
In the code of page 4, it appears the line:

this.authors = new List<Author>();

but List in Java is an interface, not a concrete class. You should use ArrayList or LinkedList to instantiate the list, for example:

this.authors = new ArrayList<Author>();

And, if java 7 or higher is used, you can use the diamond operator to infer the type of the list.

this.authors = new ArrayList<>();

Juan Manuel
aslam.khan (50) [Avatar] Offline
#2
Re: List is an interface
Thanks Juan. You are correct. I will fix that asap.
jmgimeno (69) [Avatar] Offline
#3
In the last PDF this is not yet corrected.