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 oops concepts in detail?
Why hashcode is used in java?
How to read and write image from a file ?
Can a static class implement an interface?
What is the meaning of nullable?
Write java program to reverse string without using api?
What is void in java?
What is a static class in java?
What is meant by attribute?
placement papaers of spring computing technology
What are the types of relation?
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
What is java argument list?
Is a method a procedure?
Can you call a method on a null object?