NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

java.lang.String String.split()

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
ASararu



Joined: 27 Aug 2009
Posts: 12

PostPosted: Fri Sep 11, 2009 1:19 pm    Post subject: java.lang.String String.split() Reply with quote

Hi .
When I try to use the String.split() method in my Mobile application i always get this error:

cannot find symbol
symbol : method split(java.lang.String)
location: class java.lang.String

I tried using the method in a java application and there it worked.

i used this simple code in both applications:

String answer1 = "abd, def, ghi";
String [] answer = answer1.split(", ");

have any ideas why this error occurs?
Back to top
Ove Nordstr
Posted via mailing list.





PostPosted: Fri Sep 11, 2009 2:32 pm    Post subject: java.lang.String String.split() Reply with quote

Hi,
There's no built in method to split strings in MIDP, but it's not hard
to write one using String.indexOf() and String.substring().
Read more: http://discussion.forum.nokia.com/forum/showthread.php?t=97769
/ove

2009/9/11 ASararu <address-removed>:
Quote:
i get this error when i try to use in my MIDlet application the method String.split():



cannot find symbol

symbol
Back to top
ASararu



Joined: 27 Aug 2009
Posts: 12

PostPosted: Sat Sep 12, 2009 1:44 pm    Post subject: Reply with quote

Thanks for the info. Didn't know that there's no split method.
Back to top
meetjack



Joined: 15 Apr 2014
Posts: 2

PostPosted: Tue Apr 15, 2014 6:35 pm    Post subject: Re: java.lang.String String.split() Reply with quote

ASararu wrote:
Hi .
When I try to use the String.split() method in my Mobile application i always get this error:

cannot find symbol
symbol : method split(java.lang.String)
location: class java.lang.String

I tried using the method in a java application and there it worked.

i used this simple code in both applications:

String answer1 = "abd, def, ghi";
String [] answer = answer1.split(", ");

have any ideas why this error occurs?


are you able to solve it?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo