Home / q&a / q&a

q&a

Check Also

Javascript convert string to boolean

So Many people have been asking me for various methods to convert string to Boolean ...

One comment

  1. where is the problem in my code.It keeps saying String IndexOutOfBoundsException:
    public void reverse()
    {
    StringBuffer word;
    word=new StringBuffer(“”);
    int c=0;
    String s1=””;
    for (int i=0;i<l;i++)
    {
    if(s.charAt(i)!=' ')
    {
    StringBuffer stemp=new StringBuffer(s.charAt(i));
    word=word.append(stemp);//creating a temporary word
    s1=word.toString();
    }
    else//reversing the word and replacing the original word
    {
    word=word.reverse();
    int l1=word.length();
    s=s.replace(l1,i,s1);
    word=word.delete(0,l1);
    }
    }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.