Access modifier:
public //
public void add()
protected // protected void add()
Default // void add()
private // private void add()
Access modifier |
Within Class |
Within Package |
Out side Package by super class (inheritance) |
Out side package |
public |
Yes |
Yes |
Yes |
Yes |
protected |
Yes |
Yes |
Yes |
No |
Default |
Yes |
Yes |
No |
No |
private |
Yes |
No |
No |
No |
No comments:
Post a Comment