(C#)
ScreenShots: https://pasteboard.co/JGKU92J.jpg https://pasteboard.co/JGKUrQd.jpg
I wrote in first one < and the other one <=
Why when I wrote <= like that it gaveme error?
Sorry for my Englsih
(C#)
ScreenShots: https://pasteboard.co/JGKU92J.jpg https://pasteboard.co/JGKUrQd.jpg
I wrote in first one < and the other one <=
Why when I wrote <= like that it gaveme error?
Sorry for my Englsih
Don't forget 0 when counting the entries of a list. When you are asking for the length of a List, Array, String,... the program gives you back the amount of values that are in there. But you cannot check position metin[metin.length()]
as it will never be defined, because metin[0]
is already a position.
The last position of your array is metin[metin.length()-1]
, but when you are doing the for
loop until i
is greater or equal than metin.length()
you are asking for one more, which is undefined and hence the error.