title: Issue with storing percentages in a long
body: <p>I am trying to write a program for class that reads a list of hours worked annually from a .txt file, assigns/reads (A little fuzzy on the proper terminology :)) them into an array, and then calculates overages and prints them.</p>
  
  <p>When I run, console output is as follows:</p>
  
  <pre><code>Employee 1 worked 1600 hours, an under-run of 160 or 0%
  Employee 3 worked 1680 hours, an under-run of 80 or 0%
  </code></pre>
  
  <p>Why are the percentages zero?</p>
  
  <pre><code>import java.io.*;
  import javax.swing.*;
  
  class Calculator 
  {
   public static void main(String args[])
    {
  
    try{
  
        String filePathString=JOptionPane.showInputDialog(null,"What is the file path?");  
  
        FileInputStream fstream = new FileInputStream("C:\\hello.txt");
        BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
        String strLine;
        int counter = 0;
        long[] Array = new long[5];   
  
  
        //Read File Line By Line
        while (counter &lt;= 4)
  
          {
              strLine = br.readLine();
              Array[counter] = Long.parseLong(strLine); 
              OverageUnderage(Array[counter], counter);
              counter = counter + 1;
          }
  
    //Close the input stream
    in.close();
  
      }
  
    catch (Exception e){//Catch exception if any
    System.err.println("Error: " + e.getMessage());
    }
    }
  
   public static long OverageUnderage(long hours, long counter)
   {
   long overageAmount = 0;
   long overagePercent = 0;
  
       if (hours &lt; 1760)
       {    
          overageAmount = 1760 - hours;
          overagePercent = ((overageAmount/1760)*100);
  
          System.out.println("Employee "+counter+" worked "+hours+" hours, an under-run of "+overageAmount+" or "+overagePercent+"%");
      }
  
      return counter;
   }
  
  }
  </code></pre>