0

No comprendĆ­ la respuesta,la deduci por ensayo y error

[ 0] [2] la coordenada de ubicaciĆ³n no puede ser 8

8th Sep 2019, 1:17 AM
ismael gonzalez
ismael gonzalez - avatar
2 Answers
+ 1
Translation of your question : I didn't understand the answer, I deduced it by trial and error [0] [2] the location coordinate does not Ā can be 8 ____ So , where is your complete question? // Remember array index starts from 0 in java If you have array of n elements first element will have index 0 and second will have 1 and so on.... Last element will be at index n-1 Index ->I Element ->E | I | [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] ___|____________________ | E | e1 e2 e3 e4 e5 As index starts from 0 whenever you have to access say m'th element use index m-1 Ex. When you want to access 5th element you'll use 5-1 = 4 as index. Same is used for multidimensional array. Considering 2d array.... If you want to access element from x'th row and y'th column you'll use [x-1][y-1] as index. Ex. If you have to access element from 5th row and 3rd column you'll use index [5-1][3-1] that is [4][2] You can find such logics in the course you have joined (Java) just scroll through comment section .read properly
8th Sep 2019, 5:32 AM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 1
Gracias
22nd Sep 2019, 5:48 PM
ismael gonzalez
ismael gonzalez - avatar