By now, you are already quite familiar with packages. In this chapter, we will complete its description and then discuss different levels of accessibility (also called visibility) of classes and class members – methods and fields. It all will come down to the key concept of object-oriented programming – the encapsulation – and lay the foundation for our discussion of object-oriented design principles.
In this chapter, we will cover the following topics:
- What is importing?
- Static importing
- Interface access modifiers
- Class access modifiers
- Method access modifiers
- Property access modifiers
- Encapsulation
- Exercise – Shadowing