title: JAVA - Making Constructors, Calling Sets, and Replacing Chars in a String using set Classes
body: <p>In Java, where should I aim (I enjoy figuring it out myself) to get, with sample data:<br>
  I am Sam I am a </p>
  
  <p>the output:<br>
  I am Sam I am - letter to remove a<br>
  I m Sm I m</p>
  
  <p>Basically, it is to "Remove all instances of the specified removal letter from the original sentence"</p>
  
  <p>As this is for a class, I am limited with what I can do. For this assignment I am stuck with the given classes/constructors and am not allowed to make any more unless it is noted, which in my case, is to create another constructor class; Anyway, that has been the real challenge as it is hard to get help (No matter how many times I've googled!) with it being so specific and I new to the language. 
  Here is what I was given:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> 
  import static java.lang.System.*;
   
  public class LetterRemover
  {
     private String sentence;
     private char lookFor;
   
      public LetterRemover()
      {
          //call set
      }
   
      //add in second constructor
       
       
      public void setRemover(String s, char rem)
      {
          sentence = s;
          lookFor = rem;
      }
   
      public String removeLetters()
      {
          String cleaned=sentence;
          return cleaned;
      }
   
      public String toString()
      {
          return sentence + " - letter to remove " + lookFor;
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is what I've done so far:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import java.util.Scanner;
  import static java.lang.System.*;
  
  public class LetterRemover
  {
     private String sentence;
     private String lookFor;
  
   public LetterRemover()
   {
       //I am not sure what this means
    
   }
  
   //add in second constructor
   
   
   public void setRemover(String s, String rem)
   {
    sentence = s;
    lookFor = rem;
   }
  
   public String removeLetters()
   {
    sentence = sentence.replaceAll(lookFor,"");
       String cleaned=sentence;
    return cleaned;
   }
  
   public String toString()
   {
    return sentence + " - letter to remove " + lookFor;
    
    
   }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried changing the char to a string for the "lookfor" to use the replace all method which seemed after a lot of research and the best way to get the letters out.
  Is there any noticeable mistakes and where should I look to fix them? I do not really want the right code, or for anyone to "do" the work for me. I really want to try and figure it out. But I need a little help in pointing in the right direction to get my desired output :)
  Let me know if there is any other details or whatnot, this is also , this is also my first time using the site. There were many similar questions to this, but as I really am a beginner I struggled to understand people's explanations</p>
  
  <p>--Edit--</p>
  
  <p>Moving to my runner class, this is what I wrote, trying to get for the desired output. I am not really sure how to deal with output as I really have just started learning to write them myself.
  I keep getting a void error though:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import static java.lang.System.*;
  
  public class LetterRemoverRunner
  {
   public static void main( String args[] )
   {
    LetterRemover test = new LetterRemover
      (test.setRemover("I really want dumplings","l"));
             
   }
  }</code></pre>
  </div>
  </div>
  </p>