Java arrays

Array is an important structure in programming language and Java programming language no difference
picture_as_pdf Worksheet

QUESTION OF
calculate
Questions #: 4
Pass Score: 80.0%
Style
Mode

Is the following array defined as null or with 0 length?

int temp_array[];

POINTS (1)

Correct Answer

Explanation

What is the correct array initialization from the following?

POINTS (1)

Correct Answer

Explanation

Is the following code correct?

Verify the following code and check if there is something wrong
public class MyClass {
  public static void main(String[] args) {
    int[] myNumbers = {"1", "2", "3", "4"};
    for (int i = 0; i < myNumbers.length; ++i) {
        System.out.println(myNumbers[i]);
    }
  }
}
POINTS (1)

Correct Answer

Explanation

What is the the output of the following code snippet?

public class MyClass {
  public static void main(String[] args) {
    int[] myNumbers = {1, 2, 3, 4};
    System.out.println(myNumbers[1])
  }
}
Missing
POINTS (1)

Correct Answer

Explanation

Views
:
Trials
:
Avg score
:
0
sin cos tan
sin-1 cos-1 tan-1 π e
xy x3 x2 ex 10x
y√x 3√x √x ln log
( ) 1/x % n!
7 8 9 + MS
4 5 6 M+
1 2 3 × M-
0 . EXP ÷ MR
± RND C = MC

Document Actions