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,375
    Likes Received:
    388
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice