Explain in detail about encapsulation with an example?
Answer Posted / sanjay singh chauhan
it is way to combine field and mathod in a single entity
like a capsule ;
class A
{
int i;
void m(int i)
{
//body of this mathod ;
}
}
like this way;
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Explain about collection interface in java?
Can java program run without jre?
What is meant by oops concept in java?
List types of storage classes in java?
What do you understand by the term polymorphism?
What are extraneous variables examples?
What is stringreader?
What does the “static” keyword mean? Can you override private or static method in java?
If we don’t want some of the fields not to serialize how to do that?
What’s the difference between constructors and other methods?
What is the use of 'super' keyword inside a constructor?
What is a parameter in java?
Is upper case in java?
Why put method is idempotent?
Explain what do you mean by functional overloading in java?