You could use a two dimensional array to store your map tiles like so,
int[][] map =
{
{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
};
Then access your map positions like map[1][1]
. Or change the variables like map[0][0]
= 1.
Instead of writing out an entire array like that, you may prefer to use a loop to generate your 0's, or 1's or whatever it is you want your tiles to be.
like so,
int[][] tileMap = new int[10][10];
for(int i = 0; i < tileMap.length; i++) {
for(int j = 0; j < tileMap[0].length; j++) {
tileMap[i][j] = 0;//put whatever number you want in
//here and it will insert it instead of 0's
}
}