Question: What does the following Java code fragment do ? ( Choose ALL that apply ) int [ ] arr; Declares an array of type int
What does the following Java code fragment doChoose ALL that apply
int arr;
Declares an array of type int referenced by the variable arr.
Allocates space on the heap for the array
Allocates ten elements for the array on the heap and initialize them to zero
Creates a variablelength array named arr that grows automatically
Declares that it's talklikeapirate day "Arr!!"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
