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
Is the milky way in a void?
What does java se mean?
What is lastindexof in java?
What does += mean in java?
Can you sort a string in java?
How we create object in copy constructor?
What is the difference between post and put?
What happens when main () method is declared as private?
What one should take care of, while serializing the object?
What is java basic concept?
What is double word?
What are operators and its types?
How does sublist works in java?
Can singleton class be serialized?
What is advantage of java?