Bookmark Topic Watch Topic
  • New Topic

How to make a method splitting a String  RSS feed

 
Gregers Svensson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hey everyone! How do I make a method that can seperate parts of a String. The String is [name,aid]... example [John,5],

I want to remove [ , and ] from the String... How can I do this?

This is what i've done this far:




This dosn't work, it wont compile...

It states the following:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
at testprojekt.Validering.splitta(Validering.java:130)

Thanks in advance!
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Already answered here, I believe: http://www.coderanch.com/t/626947/java/java/Escape-character

Closing this one.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!