title: Initializing the minValue and the maxValue and the display wont show. Also, display if no number was entered
body: <p>If initialize the min and the max values to 0 it will keep on being the smallest value.I want it to show the largest number and the smallest number after the user has entered a series of integers. What would be a sensible value?</p>
  
  <p>Also, it won't display <strong>"You did not enter any numbers"</strong> if the user has not entered any number.</p>
  
  <p>my code is:</p>
  
  <pre><code>import java.util.Scanner; 
  
  public class LargestAndSmallest 
  { 
     public static void main(String[] args) 
     { 
  
        int input; 
  
        Scanner keyboard = new Scanner(System.in); 
  
        System.out.print("Enter an integer number or -99 to quit: "); 
              input = keyboard.nextInt(); 
  
        int minValue = 1; 
        int maxValue; 
  
        while (input != -99) 
        { 
              if (input &gt; maxValue) 
              { 
                   maxValue = input; 
              } 
              else if (input &lt; minValue) 
              { 
                   minValue = input; 
              }
  
           System.out.print("Enter an integer number or -99 to quit: ");   
              input = keyboard.nextInt(); 
        }
  
        if (input == -99) 
        { 
           System.out.println("\nYou did not enter any numbers"); 
  
           System.out.print("\nLargest: " + maxValue); 
  
           System.out.print("\nSmallest:" + minValue);
        }  
  
   } 
  
  }   
  </code></pre>