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


Please Help Members By Posting Answers For Below Questions

Is the milky way in a void?

536


What does java se mean?

584


What is lastindexof in java?

538


What does += mean in java?

565


Can you sort a string in java?

480






How we create object in copy constructor?

634


What is the difference between post and put?

533


What happens when main () method is declared as private?

646


What one should take care of, while serializing the object?

480


What is java basic concept?

519


What is double word?

529


What are operators and its types?

565


How does sublist works in java?

534


Can singleton class be serialized?

507


What is advantage of java?

534