File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Splitting String Problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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: 19790
    
  20

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 - OCEEJBD 6
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