+ 4
I can't understand arrays in have
I can't understand arrays in java
6 Answers
+ 7
answer is there @Ali
+ 6
see this đđđ
https://www.sololearn.com/Discuss/230542/?ref=app
+ 2
hum let us say you can't understand arrays
if so,
an array holds data in slots
int[] myArray ={1,5,6};
to get 5 you do myArray[1];
+ 1
Thank. but I want to understand how it=42
+ 1
I'm assuming you are referring to 6/13 in data types, arrays, and pointers where it says...
int array [5]
for (x=0; x < 5; x++) {
array [x] = 42 }
In the code above all elements in the array will equal 42 because by saying array [x] = 42 we made all indexes equal 42. Basically we said that if the index is less than 5 then the index equals x. Then we plugged x into the array so all indexes less than 5 equal 42.
0
I can't understand the steps. I am new here