What I knew about encapsulation in OOP is that it refers to the restriction to the access of some data of an object. I thought that we mainly achieve encapsulation by the usage of access modifiers and properties inside of a class that allow us to validate the data before exposing it to the outer classes but in this article it's written that encapsulation also refers to bundling of data and functions into a single unit which is achieved by using/creating a class.
Honestly this is something I was not aware of until now and I am curious if there is a concrete definition of what encapsulation is and also I want to ask: Are there more examples and usages of encapsulation than using properies, classes and access modifiers?
Thank you in advance!