Math, asked by prakashpotineni0702, 10 months ago

what is encapsulation​

Answers

Answered by Janya843
8

Answer:

In object-oriented programming (OOP), encapsulation refers to the bundling of data with the methods that operate on that data, or the restricting of direct access to some of an object's components.[1] Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.

Answered by Anshu33845
1

Answer:

The Basic concept of encapsulation says that data flows down the protocol hierarchy, headers (and trailers) get appended to it and data moves up the hierarchy headers (and trailers) get stripped off.

Example to illustrate :-

  1. Trivial file transfer protocol (TFTP).
  2. TFTP client transfer 200 bytes of data.
  3. 4 Bytes of TFTP header gets added.

Similar questions