title: can someone help me with my java assignment?
body: <p>Hello can someone help me resolve the issue that I'm facing:</p>
  
  <p>For some reason it will not move after the hoursEntered() operation. I would like it to go to the if else block</p>
  
  <pre><code>package Exercises;
  
  import java.util.Scanner;
  
  public class ParkingCharges {
  
      static Scanner input = new Scanner(System.in);
      static double minimum_fee = 2.0;
      static double maximum_fee = 10.0;
      static double extra_per_HourCharge = 0.50;
      int daily_hours;
  
      public static void main(String[] args) {
          Display();
          hoursEntered();
          if (hoursEntered() &lt;= 0.0 || hoursEntered() &gt;24) {
              System.out.println("Invalid hours entered. Valid hours are 1 through 24");
              Display();
              hoursEntered();
          }
          if (hoursEntered() &lt;= 3.0) {
              System.out.println("Minimum number of hours parked" + minimum_fee);
          } else {
              extraCharge();
          }
      }
  
      static void Display() {
          System.out.println(" Enter the number of hours parked: ");
      }
  
      public static double hoursEntered() {
          double numberOfHours = input.nextDouble();
          System.out.println(numberOfHours);
          return numberOfHours;
      }
  
      public static double extraCharge() {
          double extraChargeAmount = 0.0;
          extraChargeAmount = minimum_fee + (hoursEntered() - 3)*extra_per_HourCharge;
          if (extraChargeAmount &gt;= 10.0) {
              extraChargeAmount = 10;
              return extraChargeAmount;
          } else {
              return extraChargeAmount;
          }
      }
  }
  </code></pre>
  
  <p>This program will not move to the next steps for some reason ??</p>