title: using scanner in java error: variable age might not have been initialized
body: <pre><code>import java.io.*;
  import java.util.Scanner;
  
  public class Age {
  
  public static void main(String []args) {
  
  System.out.println("Enter Your Age: ");
  
  int age;
  Scanner in = new Scanner(System.in);
  in.nextInt();
  
  if(age&lt;18)
  {
     System.out.println("You Can't Vote");
  }
  else
  {
      System.out.println("You Can Vote Now");
  }
  } 
  }
  </code></pre>
  
  <p>Compiler gives error during compile plz solve any one.</p>
  
  <p>error: variable age might not have been initialized</p>