RUSES
Would you like to react to this message? Create an account in a few clicks or log in to continue.
April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar


[Java] Can't print my array

Go down

[Java] Can't print my array Empty [Java] Can't print my array

Post  LiamWhite Sat Nov 03, 2012 6:04 am

So I'm trying to print my array like this:

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

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum