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 sorting algorithm does javascript use?
What is mysql driver class name?
What is the main method java?
Which object oriented concept is achieved by using overloading and overriding?
What is difference between overloading and overriding in java?
What is the difference between static class and normal class?
What is the difference between jdk and jre?
Differentiate between class and structure.
What is a line separator in java?
What Is Query Throttling in java?
Which eclipse is best for java?
What is lexicographically smallest string?
Is a boolean variable?
What classes of exceptions may be thrown by a throw statement?
What is this () in java?