5 years ago in Java Arrays

What will be output using following code block?

int[] a = {0,1,2,3,4,5,6,7};

System.out.println(a.length);

[A] 6
[B] 7
[C] 8
[D] 9
Loading...
Next Question

Overall Stats

Attempted 211
Correct 137
Incorrect 10
Viewed 64

Answers

Guest
Guest
Rakhi Sharma
Rakhi Sharma - 1 week ago

Rakhi Sharma is saying 8 is correct answer

Vaibhav Bisht
Vaibhav Bisht - 3 weeks ago

Vaibhav Bisht from Dehradun, India is saying 8 is correct answer

Fâtïmá Żahřâ Zágñane
Fâtïmá Żahřâ Zágñane - 4 weeks ago

Fâtïmá Żahřâ Zágñane from Casablanca, Morocco is saying 8 is correct answer

Awa Kone
Awa Kone - 4 weeks ago

Awa Kone from Berrechid, Morocco is saying 8 is correct answer

ayoub benigmim
ayoub benigmim - 1 month ago

ayoub benigmim from Casablanca, Morocco is saying 8 is correct answer

Related Questions

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;