title: Return the nth digit of a number
body: <pre><code>public class Return {    
      public static void main(String[] args) {        
          int answer = digit(9635, 1);
          print("The answer is " + answer);
      }
  
      static void print(String karen) {
          System.out.println (karen);
      }
  
      static int digit(int a, int b) {
          int digit = a;
          return digit;
      }     
  }
  </code></pre>
  
  <p>Create a program that uses a function called <strong>digit</strong> which returns the value of the nth 
  digit from the right of an integer argument. The value of n should be a second argument.</p>
  
  <p>For Example: <code>digit(9635, 1)</code> returns <code>5</code> and <code>digit(9635, 3)</code> returns <code>6</code>.</p>