title: I need to pull digit places (like tenths place, hundredths place, etc...)
body: <p>I need to pull out a specific number place, like tenths place, out of numbers that the client puts in. For example, they put in the number 156 and if I need the tenths place, they pull out the 5. Or if they need the hundredths place it will pull out 1. </p>
  
  <p>This is my first Java programming class so we haven't gone over the advanced stuff yet, but here is what I have so far: </p>
  
  <pre><code>    /**
   * @author Eddie Maiale
   * @version October 1st, 2015
   */
  public class LcdDigit {
      //Digit display field
      private int digitValue;
  
      public LcdDigit() {
          digitValue = 0;
      }
  
      public LcdDigit (int newDigitValue, int place) {
          if (newDigitValue &gt;  0) {
              digitValue = newDigitValue;
          }
  
          if (place &lt; 10) {
              digitValue = digitValue % 10;
          } else if (place &lt; 100) {
              digitValue = digitValue % 100;
          } else {
              digitValue = digitValue % 1000;
          }
  
      }
  
      public int getDigitValue() {
          return digitValue;
      }
  
      public void setDigitValue (int newDigitValue, double place) {
          if (newDigitValue &gt; 0) {
              digitValue = newDigitValue;
          }
  
          if (place &lt; 10) {
              digitValue = digitValue % 10;
          } else if (place &lt; 100) {
              digitValue = digitValue % 100;
          } else {
              digitValue = digitValue % 1000;
          }
      }
  
      public String returnString() {
          return "" + digitValue;
      }
  }
  </code></pre>
  
  <p>This is what the client code is:</p>
  
  <pre><code>class LcdDigitDriver {
  
  
   /** The main method where the program starts. */
      public static void main(String[] args)
      {
          LcdDigit noArgs = new LcdDigit();
          LcdDigit onesPlace = new LcdDigit(456, 1);
          LcdDigit tensPlace = new LcdDigit(456, 10);
          LcdDigit hundredsPlace = new LcdDigit(456, 100);
          System.out.println(noArgs.getDigitValue());
          System.out.println(onesPlace.getDigitValue());
          System.out.println(tensPlace.getDigitValue());
          System.out.println(hundredsPlace.getDigitValue());
          System.out.println(hundredsPlace.returnString());
          hundredsPlace.setDigitValue(892, 100);
          System.out.println(hundredsPlace.getDigitValue());
      }
  }
  </code></pre>
  
  <p>And the output needs to look like this: </p>
  
  <pre><code>0
  6
  5
  4
  4
  8
  </code></pre>
  
  <p>Edit: Current output is like this:</p>
  
  <pre><code>0
  6 
  56 
  456 
  456 
  892
  </code></pre>