int[] x = new int[25]
Which of statements below are true?
Explanation
This line creates an array with size 25. In java array indexing starts with 0, so last element has index 24. Also, arrays of primitive number types are initialised with 0.

@Cipher thanks!

2017 Dec 5, 4:02:48 PM

Explanation. Last element in array has index 24, not 0.

2017 Nov 22, 9:47:06 AM

+Vitaliy Kotov Thanks! We have updated question. Now it should be more clear)

2015 Aug 4, 2:42:56 PM

"Statement" is an ambiguous word for this question. "A statement forms a complete unit of execution". These are not statements in sense of Java language (sure they are in natural language), these are expressions - so the correct answer is "none". I think, the question should be changed to "which of these are true: ".

2015 Jul 31, 5:20:09 PM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes