5 years ago in Java Arrays

class Output {
public static void main(String args[])
{
int arr[] = {1, 2, 3, 4, 5};
for ( int i = 0; i < arr.length - 2; ++i)
System.out.println(arr[i]);
}
}

[A] 1 2
[B] 1 2 3
[C] 1 2 3 4
[D] 1 2 3 4 5
Loading...
Next Question

Overall Stats

Attempted 234
Correct 88
Incorrect 54
Viewed 92

Answers

Guest
Guest
Rakhi Sharma
Rakhi Sharma - 2 weeks ago

Rakhi Sharma is saying 1 2 3 4 is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying 1 2 3 4 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 1 2 3 is correct answer

Awa Kone
Awa Kone - 1 month ago

Awa Kone from Berrechid, Morocco is saying 1 2 is correct answer

ayoub benigmim
ayoub benigmim - 1 month ago

ayoub benigmim from Casablanca, Morocco is saying 1 2 3 is correct answer

Related Questions

Arrays in Java are implemented as?

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