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
Abhinay Verma
Greenhorn
Joined: Dec 13, 2004
Posts: 24
posted
0
It is working and not giving compilation errors. The code gave the following output: hai how
Which version of J2SE are you using?
K Riaz
Ranch Hand
Joined: Jan 08, 2005
Posts: 375
posted
0
Fine for me also. Do a "java -version".
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
posted
0
String.split() is not in version 1.3. It's available only from V1.4