In this session you will learn:
Understanding Encapsulation
For more information, visit: https://www.mindsmapped.com/courses/software-development/java-developer-training-for-beginners/
3. Page 3Classification: Restricted
Encapsulation
com.example.pack1
A
private int pri;
int def_b;
protected in
pro_c;
public int pub_d;
C
private int pri;
int def_b;
protected in
pro_c;
public int pub_d;
B
private int pri;
int def_b;
protected in
pro_c;
public int pub_d;
com.example.pack2
D
private int pri;
int def_b;
protected in
pro_c;
public int pub_d;