title: what happens to protected members after inheritance in java?
body: <p>As in C++ protected members were becoming private in private inheritance .
  so I am very confused what happens in Java . do here access specifiers remain same or what? like</p>
  
  <p>if suppose below code exists then now shiva will still remain protected  inside classB ? can we again use it in classC ?</p>
  
  <p>Any help will be appreciated.</p>
  
  <pre><code>package package1
  class classA
  {
  protected shiva;
  }
  
  ////////////////////////
  import package1
  package package2
  class classB extends classA
  {}
  
  //////////////////////
  import package2
  class classC extends classB
  {}
  </code></pre>