title: How to make main method calculate return value?
body: <p>I wanted the user to enter the pay rate and hours worked. If the hours are 40 or below, it is to multiply the pay rate and the hours together. All of that is to happen in one method and the main method is supposed to call this. However, my program does nothing with the values.</p>
  
  <pre><code>package homework6;
  
  import java.util.Scanner;
  
  
  public class Homework6 {
      public static void main(String[] args) {
          Scanner console = new Scanner(System.in);
  
          System.out.println("Enter your pay rate.");
          double r = console.nextDouble();
  
          System.out.println("How many hours did you work this week?");
          int h = console.nextInt();
  
          double T1 = getTotalPay(r, h);
      }
  
      public static double getTotalPay(double r, int h){
          /*If the number of hours is less than or equal to 40, it simply
            multiplies them together and returns the result.*/
          if (h &lt;= 40) {
              return r*h;
          }
      }
  }
  </code></pre>