sorry cannot see a more obvious place to post this. On pg 130 we have this statement:
Java 5 allows you to tell the compiler what the type would be by specifying it between < and >. Starting in Java 7, you can even omit that type from the right side. The < and > are still required, though. This is called the diamond operator because <> looks like a diamond.
It is wrong. You do not need the <> on the right hand side as evidenced in this question from the third sample exam paper:
Which of the following compile? (Choose all that apply)
A. List<Integer> l1 = new ArrayList();
and can be proven with this
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop