Sunday , January 22 2017
Home / q&a / q&a

q&a

q&a

Check Also

Hide Mouse Pointer C Program

How to Hide a Mouse Pointer Program in C : This program will show and hide ...

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.