In scrapbook, I get a syntax error when I try to specify the type Book of my ArrayList. Here is the code:
ArrayList<Book> list = new ArrayList<Book>();
Book b1 = new Book("Great Expectations");
Book b2 = new Book("War and Peace");
list.add(b1);
list.add(b2);
list
The error is:
Syntax error on token "<", invalid AssignmentOperator
Installed I have:
jdk1.7.0
jre7
eclipse 3.02
Any help or suggestions, greatly appreciated as I'd like to move to lesson 10
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In scrapbook, I get a syntax error when I try to specify the type Book of my ArrayList. Here is the code:
ArrayList<Book> list = new ArrayList<Book>();
Book b1 = new Book("Great Expectations");
Book b2 = new Book("War and Peace");
list.add(b1);
list.add(b2);
list
The error is:
Syntax error on token "<", invalid AssignmentOperator
Installed I have:
jdk1.7.0
jre7
eclipse 3.02
Any help or suggestions, greatly appreciated as I'd like to move to lesson 10
Thanks.
This has been resolved. I had two installations of the jdk, x86 and x64 - I uninstalled everything - and reinstalled cleanly. All fixed.