Question

  Asked: May 12 2008   1:19 PM GMT
  Asked by: Development88


xml String


XML string, Java, J2ME, XML

im developing a J2ME mobile application when a enter login details to be fetched from the database on the interface it says String index out of range why?Please help!

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



You are reading the string beyond it's length. This happens if you use a for loop or while loop to parse a string and you do not check to see if you are beyond it's length. Or you do not check if the index is -1 (The answer you get if you ask for an indexOf and it doesn't find a corresponding match in the string and then try to read the string index of -1.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development and Mobile.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register