Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot resolve symbol: method split, location: class java.lang.String

843838Dec 19 2005 — edited Dec 19 2005
Hi,
Iam using J2SE1.4.2_10 version on my RedHat Entriprise linux and running tomcat5.0.28. I got the following error when I tried to execute the simple JSP program.
<%
java.lang.String str="a,b,c";
String arr[] = str.split(",");
for(int i=0;i<arr.length;i++)
out.println(arr);
%>

Error:
cannot resolve symbol symbol : method split (java.lang.String)
location: class java.lang.String String arr[] =str.split(",");
^
I dont want to use StringTokenizer.

Can anyone pls let meknow where Iam going wrong.

thanks in advance

Regards
Rao.,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2006
Added on Dec 19 2005
1 comment
449 views