Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: Initialize a static array

Java: Initialize a static array
{filelink=12430}

import java.util.*;
import java.io.*;
class InitArrays
 {
static Integer[] intsArray;
static {
  intsArray= new Integer[] {
        new Integer(1)
        ,new Integer(2)
        ,new Integer(3)
        ,new Integer(4),
     };
}
  public static void main(String args[]) {
    for (int i=0;i<intsArray.length;;i++)
    {
		System.out.println(intsArray[i]);
    }
   }

Users who found this page were searching for:

  • initialization hexa array 2d in java

No comments yet.

Leave a Comment