New to the board. Please forgive if my post isn't in the right place.
I'm trying to declare an ArrayList in a class, instantiating in the constructor. My syntax is obviously wrong at the last line. Any suggestions? Thanks in advance.
public class InvoiceRecord {
private Header HeaderLine; private List HdrCommentLines; private List DetailLines; private List DetCommentLines;
InvoiceRecord() { //errorHdrCommentLines = new ArrayList<HeaderComments>();
Although it would be far better if the member HdrCommentLines were parameterized, I don't see anything technically wrong with this (as long as the class HeaderComments exists, of course.)
Originally posted by Andrew Machen: Caret should be at "<".
Ah. OK, the problem is that generics (the feature that involves those angle brackets) was introduced in Java 5 (JDK 1.5, called "Tiger") and you're apparently user an older version of the Java compiler. You can get a newer JDK for free from java.sun.com.