Can u explain me What is encapsulation?

Answers were Sorted based on User's Feedback



Can u explain me What is encapsulation?..

Answer / manikanta.srinu

Wraping(Binding) of data in a single unit.
Encapsulation is combines one or more information into a
component.
* You hide the data for security such as making the
variables as private, and expose the property to access the
private data which would be public.
So, when you access the property you can validate the
data and set it.
Eg 1: Capsule is mixed with one or more medicine and packed
into the tube. so its related and acting in two moducles.
EX:public class Demo
{
private int _mark;

public int Mark
{
get { return _mark; }
set { if (_mark > 0) _mark = value; else _mark = 0; }
}
}

Is This Answer Correct ?    12 Yes 0 No

Can u explain me What is encapsulation?..

Answer / guest

hiding the unessential feature of an object.

Is This Answer Correct ?    8 Yes 1 No

Can u explain me What is encapsulation?..

Answer / mallikarjun.b.a

Binding The Data

Is This Answer Correct ?    2 Yes 0 No

Can u explain me What is encapsulation?..

Answer / shubh

Encapsulation:-
"Encapsulation means data binding and hiding."
In encapsulation we hide the data for security purpose.
For example- The car is one of the good example of
encapsulation. We applied the break to stop the car but
internally we don't know how the process will work.

Is This Answer Correct ?    1 Yes 0 No

Can u explain me What is encapsulation?..

Answer / 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

Can u explain me What is encapsulation?..

Answer / megha

Details of what a class 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

Can u explain me What is encapsulation?..

Answer / imatoria

Encapsulation means hiding the complexity of the object from
outer world. Hiding (wrapping) could be done with class
keyword. So, person creating the object of this class
doesn't know how this class is manufactured, but only public
variables/properties/functions etc.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

How Can Registry Editor in .NET?

1 Answers  


When we use windows api in .net is it managed or unmanaged code?

0 Answers  


Give an example for setter/ write-only methods

1 Answers  


object is physical and class is logical..here class is not occupying any memory as our definition of class but i got a question then the class where it stores if it is not occupying any memory....

0 Answers   Infotech, Wipro,


How to send the Mail in C# using ASP.Net ? And my Answer is as follows ?

3 Answers   Intel,






Difference between dispose and finallize method?

0 Answers  


Which among the following two is best and why? Abstract Class and Interface. What is the major difference in between those two except the discrete methods and methods with function definition.

4 Answers   247Customer,


Types of evidence in .net with context to CAS

0 Answers  


What base class do all Web Forms inherit from?

1 Answers  


What is a strategy pattern? Implement it.

1 Answers  


What is Polymorphism? How does VB.NET/C# achieve polymorphism?

0 Answers  


What is singlecall activation mode used for in .net?

0 Answers  


Categories