what is






 

Question by  exliny (21)

What is encapsulation in Java?

 
+5

Answer by  NerdyTech (137)

It is a feature of the Java language that allows an object to have its own values and methods, but they are hidden from the outside.

 
+4

Answer by  mmonshausen (114)

Encapsulation is an object-oriented techniques which proposes to make object's data (its attributes) only avialable via methods. This technique allows to control access to object's data or do some convertion before saving or delivering data. In Java encapsulation is realised using private instance variables and public getter and setter methods.

 
You have 50 words left!