title: How to use scanner in java?
body: <pre><code>import java.util.Scanner;  
  
  public class Initials {  
      Scanner getin = new Scanner (System.in);  
      public static void main(String[] args) {  
          String Name;  
          System.out.println("Enter your name's Initials::");  
          Name=getin.nexlinet();  
      }  
  }
  </code></pre>
  
  <p>error : non-static variable cannot be referenced from a static context?</p>