Home arrow static arrow Java Programming [Archive] - Help me!! 2 dimensions array - initialization
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Help me!! 2 dimensions array - initialization
This topic has 1 reply on 1 page.

Posts:1
Registered: 7/31/04
Help me!! 2 dimensions array - initialization  
Jul 31, 2004 12:11 AM



 
public class DotPlot_Student
{
final static int SIZE = 10; //Maximum length of the sequence

static int [][] match = new int [SIZE][SIZE];
static char [][] overlay = new char [SIZE][SIZE];
static String xStr = "CCCAA"; //test 1
static String yStr = "CCAAA"; //test 2
static char x[] = new char [SIZE];
static char y[] = new char [SIZE];

//Sliding window size and stringency
static int winSize = 3;
static int stringency = 2;

//Initilization of array
private static void init()
{
for (int i = 0; i < SIZE; i++)
for (int j = 0; j < SIZE; j++)
{
//What is need to be initialized?
//at least 2 lines of code.
//can someone help me solve?
}
}

}
 

Posts:11,200
Registered: 7/22/99
Re: Help me!! 2 dimensions array - initialization  
Jul 31, 2004 12:41 AM (reply 1 of 1)



 
static int [][] match = new int [SIZE][SIZE];

The array is already initialized, you don't need to do anything more.
 
This topic has 1 reply on 1 page.