5 years ago in Java Arrays

int number[] = new int[5]; After execution of this statement, which of the following are true?

(A) number[0] is undefined
(B) number[5] is undefined
(C) number[4] is null
(D) number[2] is 0
(E) number.length() is 5

[A] (A) & (E)
[B] (C) & (E)
[C] (E)
[D] (B), (D) & (E)
Loading...
Next Question

Overall Stats

Attempted 217
Correct 52
Incorrect 85
Viewed 80

Answers

Guest
Guest
Abhishek Singh - 2 years ago

Number(2)=garbage not 0

Shamsa hafeez
Shamsa hafeez - 3 days ago

Shamsa hafeez from Lahore, Pakistan is saying (E) is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying (B), (D) & (E) is correct answer

Fâtïmá Żahřâ Zágñane
Fâtïmá Żahřâ Zágñane - 1 month ago

Fâtïmá Żahřâ Zágñane from Casablanca, Morocco is saying (B), (D) & (E) is correct answer

Awa Kone
Awa Kone - 1 month ago

Awa Kone from Berrechid, Morocco is saying (E) is correct answer

Related Questions

Arrays in Java are implemented as?

  • [A] class
  • [B] object
  • [C] variable
  • [D] None of the mentioned