1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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,276
    Likes Received:
    364
    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