title: Public static double method?
body: <pre><code>import java.util.Scanner;
  
  public class test {
  
      private static int number1 = 100;
      private static int number2 = 1;
  
      public static double avgAge() {
  
          return (number1 + number2) / 2;
      }
  
      public static void main(String[] args) {
  
          System.out.println("Average number: " + test.avgAge());
      }   
  }
  </code></pre>
  
  <p>Why does test.avgAge() = 50.0 instead of 50.5? Is there a way to output 50.5 instead?</p>