Access level: default vs. protected

The following table shows the difference between default and protect access level. Notice the difference between reference and inherited.

java protected and default

Category >> Classes & Interfaces >> Versus  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
<pre><code> 
String foo = "bar";
</code></pre>
  • shutear

    A wonderful explanation of the accessibility of protected and default in java.

  • Wangdu

    Can you explain what u want to say?

  • Raju

    What’s this???

  • aaa

    Test