A
Alan
I installed the 1.5B1 SDK on Win2000 and cannot compile code that
contains new language features. What could I possibly be doing wrong?
Am I missing a new compiler directive to enable new language features?
javac -version returns:
javac 1.5.0-beta
This is the code:
import java.util.ArrayList;
public class Generics
{
public static void main(String[] args)
{
ArrayList<Integer> list = new ArrayList<Integer>();
}
}
error:
Generics.java:6: '(' or '[' expected
ArrayList<Integer> list = new ArrayList<Integer>();
^
I also can't compile with the new 'for loop' construct.
Thanks,
Alan.
contains new language features. What could I possibly be doing wrong?
Am I missing a new compiler directive to enable new language features?
javac -version returns:
javac 1.5.0-beta
This is the code:
import java.util.ArrayList;
public class Generics
{
public static void main(String[] args)
{
ArrayList<Integer> list = new ArrayList<Integer>();
}
}
error:
Generics.java:6: '(' or '[' expected
ArrayList<Integer> list = new ArrayList<Integer>();
^
I also can't compile with the new 'for loop' construct.
Thanks,
Alan.