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
Difference between abstract and concrete class ?
How do you stop a thread in java?
Which is fastest collection in java?
Wha is the output from system.out.println(“hello”+null); ?
What methodology can be employed to locate substrings inside a string?
What is difference between protected and private?
How do you declare a variable?
What is a boolean output?
How do you write a good declaration?
What is string builder in java?
What is the difference between sop and work instruction?
How to find the index of the largest number in an arraylist java?
What are the types of methodology?
What is array command?
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?