whst is encapsulation?when u encpsulate actually while
devoloping code?
Answer Posted / jag bhushan
Encapsulation means wrapping of data and the accessing
methods in one unit and hiding the data from outside world.
the data can be accessed only by using getter/setter method
so that no one can set a wrong value for a vriable. like
weight can not be less than zero. so if anyone want to set
the weight, it have to set only be using getter/setter.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are synchronized methods and synchronized statements in java programming?
Can we force the garbage collection to run?
What is passing value java?
When do we use synchronized blocks and advantages of using synchronized blocks?
Is there a sort function in java?
What is difference between array and arraylist in java?
What is serialization in java?
Explain an algorithm to find depth of a binary tree.
What is the difference between a break statement and a continue statement?
What is string intern in java?
What is jee6?
What is java console application?
What does += mean coding?
Explain some best practices you would apply while using collection in java?
What is incompatible types in java?