Inside the class or interface, a field or a method of this class or interface can be accessed just by the name. But from outside the class or interface, the non-private field or method can be accessed using the dot (.) operator and:
- If the field or method is non-static (instance member), the object name
- If the field or method is static, the interface or class name
We have seen many such examples already. So, we just summarize all the cases ...