1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

looking for Solution of 2D array in Java

Discussion in 'Java' started by Suneels78, Aug 31, 2006.

  1. Suneels78

    Suneels78 New Member

    Joined:
    Aug 31, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.

    ########################
    ########################
    ########################
    ########################
    ########################
    ########################
    ########################
    ########################
    ########################
    ########################
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    Code:
    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.
     

Share This Page