How to hide information help separate the modules that make up the system?
Encapsulation (hiding information) allows you to set only an absolute minimum in the outside world. This means that you can change unused bits in your heart content without affecting clients.
Random example. Suppose you have implemented a data structure that contains rows in an array. If you expose an array, users of your data structure can simply use str[7]to get the row at position 7.
str[7]
, , , . , , , .
, , . , , .
, :
String getStringAt (int n);
, .
, (API) .
, , , . , , ( ), .
, , , API. , API, - .
, ., - , , , //call-it-what-you-may, "" .
, API, , , API , interop. ( , , - A, x B ( B x, , !)
Source: https://habr.com/ru/post/1721363/More articles:LINQ: Π·Π°Π΄Π°Π½ ΡΠΏΠΈΡΠΎΠΊ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ², ΡΠΎΠ·Π΄Π°ΠΉΡΠ΅ ΡΠ»ΠΎΠ²Π°ΡΡ Ρ Π΄ΠΎΡΠ΅ΡΠ½ΠΈΠΌΠΈ ΠΎΠ±ΡΠ΅ΠΊΡΠ°ΠΌΠΈ Π² Π²ΠΈΠ΄Π΅ ΠΊΠ»ΡΡΠ΅ΠΉ ΠΈ ΡΠΎΠ΄ΠΈΡΠ΅Π»ΡΡΠΊΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² ΠΊΠ°ΠΊ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ - c#Checking arguments in Python numeric code - pythonHow to do two UINavigationController operations from the same method? - iphoneSwitching between ModalViews - objective-cΠ‘ΡΡΠ»ΠΊΠ° Π½Π° ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π² CSS Ρ ΠΏΠΎΠΌΠΎΡΡΡ Wicket - javaHow to create a website using an application with the extension MSBuild - iis-7How to track if (List ) collection? - collectionscreate a workflow and save it throughout the entire application life cycle to complete some of the back tasks - multithreadingdeploying the GAE XMPP service as an external component to an existing XMPP server (for example, ejabberd or OpenFire) - javaappspot xmpp talk with jabber.org - javaAll Articles