- 註冊時間
- 2024-5-16
- 最後登錄
- 2024-5-16
- 閱讀權限
- 10
- 積分
- 5
- 精華
- 0
- 帖子
- 1
該用戶從未簽到
|
What is encapsulation in Java, Python and The article explains What is encapsulation in OOP Benefits of Encapsulation The difference between encapsulation and hiding Encapsulation in Java Encapsulation in Python Encapsulation Features in C Take the test and find out which field suits you IT, design or marketing. Free from Geekbrains What is encapsulation? In object-oriented programming, this concept usually means enclosing data and functionality in a shell.
In this case, we are not talking about hiding, this is just part of Bulgaria Email List encapsulation. Such a shell can be classes that concentrate data in one place and protect it from outside influences (in fact, hide it). Beginning programmers sometimes wonder why encapsulation is used at all, without fully understanding its value. Let's figure this out. What is encapsulation in OOP First, let's try to explain what encapsulation is in simple words.
Let us mentally transport ourselves about years into the past. At that time, cars were still a novelty, and the first examples of such vehicles with steam engines aroused many critical comments. They were called noisy monsters that polluted the air and scared horses. The person who drove such a car needed to clearly understand how everything works, carefully monitor the temperature, the presence of the required volume of water, and regularly add coal for further movement.
|
|