Computer Science, asked by satyanarayanpanda59, 1 year ago

What is encapsulation in java?​

Answers

Answered by riya4865
3

Explanation:

Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction. Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. ... Declare the variables of a class as private.

Hope it helps you

Answered by amannishad0512p5zxh6
3

Encapsulation,its name suggest  when  something when we read this word capsule related,exactally it same as capsule,you say how like capsule ,something wrapped medicine into single unit ,to remember definition you could remember name of capsule,in langauge of java its definition is :--

Definition :-  Wrapping of data and it associated classes,functions into single unit is called Encapsulation.

For more java related doubts follow me,mark me brainlest if you like my way of explaination.

Similar questions