Discussion Board

Results 1 to 2 of 2

Thread: problem in code

  1. #1
    Registered User
    Join Date
    Jul 2010

    problem in code

    after executing the code its showing the error "String Index out of range " i could not find my fault so please help me

    NOTE : before running the application copy MYFILE.TXT in the memory card and make empty files of BACKUP.TXT and TEMPERARY.TXT its important

    SOURCE FILE : process.java =>http://www.megafileupload.com/en/fil...cess-java.html
    MYFILE.TXT : => http://www.megafileupload.com/en/fil...YFILE-TXT.html

    please dont change the content of the file
    please help me

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    Re: problem in code

    Looks like:

    for (int i=0;i<str.length();i++)
    String.substring() throws a StringIndexOutOfBoundsException if the endIndex is greater then the length of the string.

    No need to use equalsIgnoreCase() when there is no case to match.

    You might find it more efficient to use String.indexOf().


Similar Threads

  1. what is the problem with this code?
    By raj8nokiaforum in forum Symbian
    Replies: 18
    Last Post: 2008-10-08, 14:38
  2. what is the problem in my code????????
    By jennie in forum Symbian User Interface
    Replies: 21
    Last Post: 2007-11-05, 09:09
  3. Replies: 3
    Last Post: 2007-01-18, 11:27
  4. Replies: 0
    Last Post: 2003-09-26, 15:07
  5. Code problem.
    By giudicea in forum Symbian
    Replies: 0
    Last Post: 2003-09-25, 10:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts