Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Splitting String Problems

 
Jasper Beckers
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
Jasper Beckers
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, I see now, thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic