Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   looking for Solution of 2D array in Java (http://www.go4expert.com/forums/looking-solution-2d-array-java-t1310/)

Suneels78 31Aug2006 12:09

looking for Solution of 2D array in Java
 
Hi,

I m looking for solution to make a 2D array in java to make belown mentioned diagram and also how can we generate the output as again below mentioned.

########################
########################
########################
########################
########################
########################
########################
########################
########################
########################

shabbir 31Aug2006 20:17

Re: looking for Solution of 2D array in Java
 
Code: Java

for(int i = 0;i<n;i++)
{
    for(int i = 0;i<n;i++)
    {
        System.Out.Print("#");
    }
}

Instead of printing you can even get them into a two dimensional array.


All times are GMT +5.5. The time now is 13:49.