Can u explain me What is encapsulation?

Answer Posted / megha

Details are what a contains is not visible to other
classes.Instead only specific information is made visible.
ATM center is one real world example.
Encapsulation is achieved with the help of properties.
ex:-
int _empno;
public int EmpNo
{
get
{
return _empno;
}
set
{
_empno=value;
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give a brief introduction on side-by-side execution. Can two applications, one using private assembly and the other using the shared assembly be stated as side-by-side executables?

519


What is the single responsibility principle?

571


Explain memory-mapped files.

632


What is the difference between task and thread in .net?

609


How is a managed code executed?

709






why you wouldn't want to write into it even if you could

564


Why did they call it .net?

590


What is Full trust permission set in .Net

1912


Explain boxing and unboxing in .net.

571


What is view state in .net?

613


Tell me about secure socket layer? How to make use of the technology?

550


What is class library in .net

601


Different between .net & j2ee ?

594


What are the collections you've used?

578


Explain what is the difference between odbc and ado?

519