When i tried to compile this, i got the follwing error? cannot resolve symbol symbol : method split (java.lang.String) location: class java.lang.String String result1 = "hai how".split("\\s"); ^ 1 error
Joined: Dec 13, 2004
It is working and not giving compilation errors. The code gave the following output: hai how
Which version of J2SE are you using?
Joined: Jan 08, 2005
Fine for me also. Do a "java -version".
Joined: Sep 28, 2004
String.split() is not in version 1.3. It's available only from V1.4