I have a problem with initializing ArrayLists.
When I used NetBeans 7.3 I tried to do this:
protected Stack<Scope> scopeStack;
protected ArrayList<Scope> allScopes;
scopeStack = new Stack<>();
allScopes = new ArrayList<>();
the file is perfectly compiled and goes fine.
But when I switch to linux using command line to compile java. It gives me an error
src/SymbolTable.java:28: illegal start of type scopeStack = new Stack<>();
SymbololTable.java:29: illegal start of type allScopes = new ArrayList<>();
Is this cause by different versions of java compiler? Or what's the reason that cause this?