[Java] Can't print my array
RUSES :: Programming :: Help
Page 1 of 1
[Java] Can't print my array
So I'm trying to print my array like this:
It is declared like this:
This is in classs. It will not let me use System.out.print(this[x][y]); either.
- Code:
//Print Map
public void print(){
for(int x=0;x<width;x++){
for(int y=0;y<height;y++){
System.out.print(Map[x][y]);
}
System.out.print("\n");
}
It is declared like this:
- Code:
//Constructor
AWorld(ABug bugs){
String[][] Map = new String[width][height];
This is in classs. It will not let me use System.out.print(this[x][y]); either.
LiamWhite- Posts : 1
Join date : 2012-11-01
RUSES :: Programming :: Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum