Skip to main content
deleted 2 characters in body
Source Link
Giorgi Tsiklauri
  • 11.5k
  • 9
  • 59
  • 84

Long story short:

default member is available in all the other classes of the same packageall the other classes of the same package;

protected member is available in all the other classes of the same package andall the other classes of the same package in any other class of any other package as long as that class extends the class containing your protected member.and in any other class of any other package as long as that class extends the class containing your protected member.

Long story short:

default member is available in all the other classes of the same package;

protected member is available in all the other classes of the same package and in any other class of any other package as long as that class extends the class containing your protected member.

Long story short:

default member is available in all the other classes of the same package;

protected member is available in all the other classes of the same package and in any other class of any other package as long as that class extends the class containing your protected member.

Source Link
Giorgi Tsiklauri
  • 11.5k
  • 9
  • 59
  • 84

Long story short:

default member is available in all the other classes of the same package;

protected member is available in all the other classes of the same package and in any other class of any other package as long as that class extends the class containing your protected member.