I have a string handling related question
split() - The return type is String[]
In this for loop we are storing the split value in a String literal
for (String retval: Str.split("-"))
Why doesn't it give a type mismatch error like in the code below?
String Str1 = "abfg-hjddh-jdj";
String Str = Str1.split("-");