Share
Explore BrainMass

Declaring and initializing Java arrays

1. Write Java syntax which declares a 1D integer array myary that holds 5 values.

2. Instantiate and initialize the array from Q#1 with values: 5, 3, 5, 7,

Solution Preview

When declaring an array in Java you need to provide the name of the new variable, the type of elements that the array will hold and the number of ...

Solution Summary

This solutions demonstrates how to declare and initialize an array in Java.

$2.19