Does it mean that the 3rd element change to 42???? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Does it mean that the 3rd element change to 42????

14th Aug 2019, 8:33 PM
Narjes
Narjes - avatar
2 Answers
+ 2
What code are you referring to? Without showing it, we effectively won't be able to help you.
14th Aug 2019, 8:43 PM
Shadow
Shadow - avatar
+ 2
If you mean this example: https://www.sololearn.com/learn/Java/2148/?ref=app Yes. int[] arr = new int[5]; all elements are 0: {0, 0, 0, 0, 0} arr[2] = 42; 0, 0, 42, 0, 0
14th Aug 2019, 9:28 PM
Denise Roßberg
Denise Roßberg - avatar