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

1 answer

Answer

1166404

2026-08-26 17:10

+ Follow

Java
Java

To declare an array and initialize it with five numbers, you can use the following syntax in languages like Java or C++: int[] numbers = {1, 2, 3, 4, 5};. This creates an integer array named numbers and initializes it with the values 1, 2, 3, 4, and 5. In Python, you would simply write numbers = [1, 2, 3, 4, 5].

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.