title: can someone help me with why my string is not working?
body: <pre><code>public static void main(String[] args)
   {
  // declares variables
  int items, time;
  double heat, h1, h2, h3, h4;
  h1 = 1.00;
  h2 = 1.25;
  h3 = 1.50;
  h4 = 2.00;
  
    Scanner num  = new Scanner(System.in);
  
   // asks user to input the amount of items to heat and the amount of time to 
  heat the items      
    System.out.println("Select number of items being heated");
    items = num.nextInt();
    System.out.println("Select amount of time in seconds to heat one item");
    time = num.nextInt();
  
      // gets user to re-enter the amount of items to less than 5  
      while (items &gt; 4)
      {
              System.out.println("warning: more than four items is too hot! 
  \nplease enter a number below 5");
          items = num.nextInt();
  }
  //heating calculations
      switch (items)
      {
  case 1:
              heat = h1;
      break;
      case 2:
              heat = h2;
      break;
  
      case 3:
  
              heat = h3;
      break;
      case 4:
          heat = h4;
  default:
      heat = 1;
          }
  
          // outputs the total time
          System.out.println("Time: " + time * heat * items + " seconds");
  
   }
   }
  </code></pre>
  
  <p>any help would be great guys! this is for a school project and it says "heat" is not being initialized</p>