I have been messing with ArrayList for awhile and today well working on this zombie game I'm making for class I got an error that I have never seen before and do not understand why I get this here is the code:
import java.util.ArrayList;
public class Room
{
private String description;
public HashMap<String, Room> exits;
public static Room currentRoom;
public ArrayList<Room> roomList = new ArrayList();
public Room(String description)
{
this.description = description;
exits = new HashMap<String, Room>();
roomList.add(this);
}
public void placeRandomZombies()
{
int listSize = roomList.size;
}
And the error:
size has private access in java.util.ArrayList
Your help is much greatful