i thought in my other post you said you cannot do that in Java- in another thread I had posted (granted I was doing something different)
*sidebar - sorry OP I don't mean to hijack thread but I feel info that I am asking is relevant to you as well*
so i had (and it was in ref to ant int but I assume same issue would have happened for string)
string validatethis = null;
and then later.....
validatethis = mystring.split(".");
So I assume that would have crashed out.. am I wrong on that assumption? or does it work in this case bc you are substantiating it while doing the split?
String str = s.split("-");
*just trying to work out the differences in why it works in one place and not the other- I am leaning towards bc you are substantiating w/ the split yes?