5 years ago in Java Arrays

Which one of the following will declare an array and initialize it with five numbers?

[A] Array a = new Array(5);
[B] int [] a = {23,22,21,20,19};
[C] int a [] = new int[5];
[D] int [5] array;
Loading...
Next Question

Overall Stats

Attempted 220
Correct 88
Incorrect 49
Viewed 83

Answers

Guest
Guest
Shamsa hafeez
Shamsa hafeez - 1 day ago

Shamsa hafeez from Lahore, Pakistan is saying int [] a = {23,22,21,20,19}; is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying int [] a = {23,22,21,20,19}; 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 int [] a = {23,22,21,20,19}; is correct answer

Awa Kone
Awa Kone - 1 month ago

Awa Kone from Berrechid, Morocco is saying int [] a = {23,22,21,20,19}; is correct answer

AHMED SOULIMANI
AHMED SOULIMANI - 1 month ago

AHMED SOULIMANI from Casablanca, Morocco is saying int a [] = new int[5]; is correct answer

Related Questions