I'm trying to run this code:
import java.util.*;
public class ScanReg {
public Map<Integer, ArrayList<Long>> scanMap = new HashMap<Integer, ArrayList<Long>>();
}
within this class:
import java.util.*;
public class NxtStart {
ScanReg sr = new ScanReg();
}
This keeps giving me the following error:
.\ScanReg.java:6: error: cannot find symbol
public Map<Integer, ArrayList<Long>> scanMap = new HashMap<Integer, Arra
yList<Long>>();
^
symbol: class Map
location: class ScanReg
.\ScanReg.java:6: error: cannot find symbol
public Map<Integer, ArrayList<Long>> scanMap = new HashMap<Integer, Arra
yList<Long>>();
^
symbol: class HashMap
location: class ScanReg
2 errors
Can somebody please tell me why?
You're possibly compiling using Java 1.4 and using generics ( only available from 1.5 onwards ).