logo

Crowdly

Which of the following is the correct way to declare and initialize an array in ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Which of the following is the correct way to declare and initialize an array in Java?

a. int[ ] numbers = new int[5] {1, 2, 3, 4, 5};  

b. int[ ] numbers = {1, 2, 3, 4, 5};

c.  int numbers[ ] = new int[ ]{1, 2, 3, 4, 5};

d.  int numbers = [1, 2, 3, 4, 5];

0%
0%
0%
More questions like this

Want instant access to all verified answers on my.uopeople.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!