private ArrayList<String> locationCells;//массив
public void setLocationCells(ArrayList<String> loc){
locationCells = loc;
}
public class SimpleDotComTestDrive{
public static void main (String[] args){
SimpleDotCom theDotCom = new SimpleDotCom();
int randomNum = (int)(Math.random()*5);
int[] locations = {randomNum, randomNum+1, randomNum+2};
theDotCom.setLocationCells(locations);
/DotComBust.java:5: error: cannot find symbol
private GameHelper helper = GameHelper();//нужные переменные
^
symbol: method GameHelper()
location: class DotComBust
/DotComBust.java:19: error: incompatible types: Object cannot be converted to DotCom
for (DotCom dotComToSet:dotComList){//повторяем с каждым dotcom
^
/DotComBust.java:35: error: incompatible types: Object cannot be converted to DotCom
for (DotCom dotComToTest : dotComList){//сделать это для всех dotcom в списке
^
Note: /DotComBust.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
Как это, "через коллекцию"?