Java arrays

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

download Export
search_insights Statistics
stylus_note White Board
Quran
calculate Calculator
dictionary Dictionary
fullscreen Full Screen

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

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

1 pts
volume_mute

int temp_array[];

note_alt Add notes
flag Flag

Correct Answer

Explanation

What is the correct array initialization from the following?

1 pts
volume_mute
note_alt Add notes
flag Flag

Correct Answer

Explanation

Is the following code correct?

1 pts
Verify the following code and check if there is something wrong
volume_mute
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]);
    }
  }
}
note_alt Add notes
flag Flag

Correct Answer

Explanation

What is the the output of the following code snippet?

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

Correct Answer

Explanation