java - Is this a valid a way to use split? -


i trying practice identifying whether or not code valid looking @ it. can't find split method implementation looks this, , want know why.

string[] names = "flowers,are,pretty".split(",",0); 

this valid.

string[] names = "flowers,are,pretty".split(",",0); for(int i=0;i<names.length;i++)     system.out.println(names[i]); 

for more info visit java docs


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -