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?
java.util
do you? I would try to import the whole class name:import java.util.Map;
and same for the other util classes used such as HashMap. – Hejira