Spit Operation


#1

Hi all

I split a string on the basis of newline initially and then on the basis of space but while using for each loop for the values after splitting on the basis of space and storing them in an array and then trying to extract value from that array there is error “index out of bound”. How to resolve this issue


#2

@mhk15 You may be extracting element from array position which is not present in array, please check it once


#3

@mhk15

Hi, Maybe you should start in index(0). :blush:


#4

Use do while i=o to arr.length-1 and increment i in loop