Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Question 1
:
Which one code fragment correctly create and initialize a static array of int
elements?
1.
static final int[] a = { 100,200 };
2.
static final int[] a = new int[2]{ 100,200 };
3.
static final int[] a;
static void init() { a = new int[3]; a[0]=100; a[1]=200; }