5 years ago in Java Arrays

What is the output of this program?
class Output {
public static void main(String args[])
{
int a1[] = new int[10];
int a2[] = {1, 2, 3, 4, 5};
System.out.println(a1.length + " " + a2.length);
}
}

[A] 10 5
[B] 5 10
[C] 0 10
[D] 0 5
Loading...
Next Question

Overall Stats

Attempted 244
Correct 119
Incorrect 33
Viewed 92

Answers

Guest
Guest
Vaibhav Bisht
Vaibhav Bisht - 4 weeks ago

Vaibhav Bisht from Dehradun, India is saying 5 10 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 10 5 is correct answer

Awa Kone
Awa Kone - 4 weeks ago

Awa Kone from Berrechid, Morocco is saying 10 5 is correct answer

ayoub benigmim
ayoub benigmim - 1 month ago

ayoub benigmim from Casablanca, Morocco is saying 10 5 is correct answer

AHMED SOULIMANI
AHMED SOULIMANI - 1 month ago

AHMED SOULIMANI from Casablanca, Morocco is saying 10 5 is correct answer

Related Questions