title: i have made this code for removing a specific word from a string
body: <pre><code>class abc
  {
      void main(String s)
      {
          s=s+" ";
          String st="";String sen="";
          int l=s.length();
          char ch;
          for(int i=0;i&lt;l-1;i++)
          {
              ch=s.charAt(i);
             if (ch!=' ')
             {
                 st=st+ch;
  
          }
          else
          {
              if(st.equalsIgnoreCase("The"))
              {
                  sen=sen+" "+st;
                  st="";
              }
          }
      }
         System.out.println("The new string is"+st);
      }
  }
  </code></pre>
  
  <p>I am attempting the remove the word "The" from a string.</p>
  
  <p>Input:
  s = "The big cat"</p>
  
  <p>Expected output:
  "big cat"</p>
  
  <p>Actual ouput:
  "bigca"</p>