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 is .net able to support a lot of languages?

0 Answers  


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

0 Answers  


How will you register com+ services?

1 Answers  


Explain what is the difference between encrypting a password and applying a hashing?

0 Answers  


How do you start, pause, continue or stop a Windows service off the command line?

1 Answers  


i have 2 functions, int add(int a,int b); double add(int a,int b); does this code implement overloading? if not what will be the error?

4 Answers   Deloitte,


What is the use of common language runtime?

0 Answers  


What is the base class of Button control in .NET?

0 Answers  


How to store and retrieve images in SQL server database through VB.NET?

1 Answers  


I was working for software company frm 2005 to 2009. I left job due to recession.I was jobless till dec 09 then i got job in bpo and i am not knowing what to do as my professional experience is with software.give me any suggestion.

0 Answers  


Explain what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

0 Answers  


Explain the difference between task and thread in .net?

0 Answers  


Categories