title: Are there any advantages of using static import over import?
body: <p>Consider the following class</p>
  
  <pre><code>public final class Constant {
    public static final String USER_NAME="user1";
    //more constant here
  }
  </code></pre>
  
  <p>This class in the package B.</p>
  
  <p>Now I am going to use this in package A. Consider following two ways which can use.</p>
  
  <p>Method 1- use <code>import B.Constant</code> </p>
  
  <pre><code>import B.Constant;
  
  public class ValidateUser {
  public static void main(String[] args) {
     if(Constant.USER_NAME.equals("user1")){
  
     }
    }
   }
  </code></pre>
  
  <p>Method 2- use <code>import static B.Constant.USER_NAME;</code></p>
  
  <pre><code>import static B.Constant.USER_NAME;
  
  public class ValidateUser {
  public static void main(String[] args) {
     if(USER_NAME.equals("user1")){
  
     }
   }
  }
  </code></pre>
  
  <p>My question is is there any difference or advantage normal import over static import in this case?</p>