aspose file tools
The moose likes Beginning Java and the fly likes Splitting String Problems Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Splitting String Problems" Watch "Splitting String Problems" New topic
Author

Splitting String Problems

Jasper Beckers
Greenhorn

Joined: Sep 05, 2009
Posts: 4
Whenever I try to use the String .split method, I get this error: Invalid Escape Sequence, even when I try to do really basic stuff like this:



Can someone help me out?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19214

You can start by posting the actual code, because your code compiles and runs just fine for me (well, after I dropped the "extends Applet" and changed the init() method into a static main method).

You have one major bug in your code though. You should never use == for comparing Strings; use equals instead:


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Jasper Beckers
Greenhorn

Joined: Sep 05, 2009
Posts: 4
Ah, I see now, thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Splitting String Problems
 
Similar Threads
Alternative to string tokenzier
Using split method with String
Splitting Between String and Numbers
An easy question about swap
split() method problem