title: Field with same names from parent class and implemented interface and just inside one class difference
body: <p>research 2 code snippets </p>
  
  <h2>Snippet 1:</h2>
  
  <pre><code>interface Int1{
      String str = "123";
  }
  class Pparent{
      String str = "123";  
  }
  class F extends Pparent implements Int1{       
  }
  </code></pre>
  
  <p>this code compiles normally.</p>
  
  <h2>snippet2</h2>
  
  <pre><code>class Pparent{
      String str = "123";
      public static String str = "123"; 
  
  }
  </code></pre>
  
  <p>result: compile error with message</p>
  
  <pre><code>variable str is already defined in class
  </code></pre>
  
  <h2>Resolution</h2>
  
  <p>for me both snippets looks like same.</p>
  
  <p>Why does I see different results</p>
  
  <h2>update for Abimaran Kugathasan</h2>
  
  <p>you say:</p>
  
  <blockquote>
    <p>Fields in interface are implicitly public static, and there not
    inherited to sub class</p>
  </blockquote>
  
  <p>contr-example:</p>
  
  <pre><code>interface Int1{
      String str = "123";
  }
  class F implements Int1{
      public static void main(String[] args) {
          System.out.println(F.str);
      }
  }
  </code></pre>
  
  <h2>I cannot write so</h2>
  
  <pre><code>class F extends Pparent implements Int1{
        public static void main(String[] args) {
          System.out.println(str);
      } 
  }
  </code></pre>
  
  <p>why? I work with static content only.</p>