How to Extract only string using For loop. For attached code: Expected Result: A0, A1, A2
Actual Result: null, A0, A1, A2
def s = new String[3]
s[0]="A0"
s[1]="A1"
s[2]="A2"
def myString
for(def i=0; i<s.size(); i++){
str = s[i]
myString = myString + ", " + str
}
log.info "Final String: " +myString
question from:https://stackoverflow.com/questions/65854833/how-to-extract-only-string-using-for-loop