- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies

Search Interview Questions

Question: What is encapsulation?

Answer: Packaging an object?s variables within its methods is called encapsulation.

Category Virtual Functions in C++ Interview Questions & Answers - Exam Mode / Learning Mode
Rating (0.4) By 1359 users
Added on 10/22/2009
Views 18988
Rate it!
Question: What is encapsulation?

Packaging an object?s variables within its methods is called encapsulation. Source:

It is protective wrapper which prevents the data from being accessed by the code outside the the wrapper, the code inside the wrapper can be accessed by a well defined interface<br><br>ex: class is a protective wrapper which binds data and methods together,they can be accessed only though well defined interface(i.e object of that class) Source:

Answered by: shaker | Date: | Contact shaker Contact shaker

Wrapping of data and member function in a single unit is known as encapsulation. Source:

Answered by: manas | Date: 1/28/2009 | Contact manas Contact manas

The wrapping of data and function together in a single unit is called encapsulation. It tell how to bind data.this is useful to hide the data which is the new feature added to oops for providing security. Source:

Answered by: jas | Date: 5/12/2009 | Contact jas Contact jas

The wrapping up of data and its associate function together in a single unit(called class) is known as encapsulation. Source:

Answered by: shalu | Date: 5/27/2009 | Contact shalu Contact shalu

Encapsulation<br>1. Encapsulation is the mechanism that binds together code and the data it manipulates and keeps both safe from outside interference and misuse.<br>2. Encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.<br>3. It binds the data and codes that operates on the data into a single entity.<br>4. Encapsulation protects an implementation from unintended actions and inadvertent access.<br>5. The encapsulation of instance variables is sometimes called as ?Information Hiding?.<br><br>The technique of hiding the internal implementation detail of an object from it?s external views. Internal structure remains private and services can be accessed by other objects only through messages passed via a clearly defined interface. Encapsulation ensures that the object providing service can prevent other objects from manipulating its data or procedures directly, and it enables the object requesting service to ignore the details of how that service is provided.<br> Source:

Answered by: Sree Ranjini | Date: 5/28/2009 | Contact Sree Ranjini Contact Sree Ranjini

Wrapping of data members and member functions in a single entity. Source:

Answered by: Bhawna | Date: 6/18/2009 | Contact Bhawna Contact Bhawna

bringing together data(attributes) and methods (behaviour) within a single entity (class) is known as encapsulation Source:

Answered by: shanthakumar | Date: 6/24/2009 | Contact shanthakumar Contact shanthakumar

Wraping of data and function into a single unit is called encapsulation. ex object and class Source:

Answered by: susil manohara sahoo | Date: 7/9/2009 | Contact susil manohara sahoo Contact susil manohara sahoo

Encapsulation is the process of hiding the data of the objects which is not contributed in it's essential characteristics. Source:

Answered by: Sudhandhu Srivastava | Date: 8/30/2009 | Contact Sudhandhu Srivastava Contact Sudhandhu Srivastava

wrapping up of data and function into a single unit that called as encapsulation.n those data n function can be accesed via instances<br>ex: class Source:

Answered by: jaywant topno | Date: 9/27/2009 | Contact jaywant topno Contact jaywant topno

It is the ability of object to hide its data n methods from rest of the programe.It is one of the fundamental principles of OOPs.<br>for Ex let we have a class called Multiplication defined below<br>Public class Multiplication<br>{<br> private void Multiply(int x,int y)<br> {<br> return x*y<br> }<br>}<br>...<br>...<br>Multiplication abc;<br>int Result;<br>Result=abc.Multipy(2,5);<br>now Multiplication is a class having fumction Multiply as one of its function and abc is the object of the class and this class is used to access the multiply function n there is no other source to access the function multiply hence no one but only object have the power to access the member function of class hiding it from the out side world. Source:

Answered by: kanika khanna | Date: 9/27/2009 | Contact kanika khanna Contact kanika khanna

Packaging of data and function into a single componate is known as encapsulation. Source:

Answered by: santosh kumar mallick | Date: 9/30/2009 | Contact santosh kumar mallick Contact santosh kumar mallick

Encapsulation is the mechanism that binds together code and the data it manipulates,<br>and keeps both safe from outside interference and misuse. Source:

Answered by: Dany | Date: 10/23/2009 | Contact Dany Contact Dany

encapsulation is feature of oops concept it is nothing but class<br>class:-<br>wrapping up of both the data members and the member functions is called class which is extacted from the concept encapsulation Source:

Answered by: P.ASHWINI | Date: 11/5/2009 | Contact P.ASHWINI Contact P.ASHWINI

Encapsulation is the process of wrapping up data and code which accesses it using a keyword "class"(in most programming languages) Source:

Answered by: Harsha H R | Date: 11/8/2009 | Contact Harsha H R Contact Harsha H R

encapsulation is hiding irrelevant information of an object Source:

Answered by: Pravin Jebadoss | Date: 11/21/2009 | Contact Pravin Jebadoss Contact Pravin Jebadoss

Encapsulation is the process of Binding data in a single class type variable. This concept is just like binding medicine in single capsul. Source:

Answered by: Bhushan | Date: 12/5/2009 | Contact Bhushan Contact Bhushan

Encapsulation is used for data hiding. By using encapsulation, operations on datas can be performed through well defined interfaces. This ensures impossibility of inadvertent change of data. For example member values of an object can only be modified through its member methods. In C++, declaring a function friend of a class makes it feasible to access the class data. Java don't have any such concept and seems more objective in this sense. Source:

Answered by: Moheed | Date: 12/11/2009 | Contact Moheed Contact Moheed

Encapsulation is the mechanism that binds together the code and the data it manipulates and keeps both safe from outside interference and misuse.<br><br>It provides the explicit boundary between an object's abstract interface and it's internal implementation details. Source:

Answered by: Monalisha Nayak | Date: 12/17/2009 | Contact Monalisha Nayak Contact Monalisha Nayak

Encapsulation is the method of putting all the similar data into a single block.Where this single block is nothing but the class.where it contains the attributes and methods. Source:

Answered by: Sudha reddy | Date: 1/3/2010 | Contact Sudha reddy Contact Sudha reddy

Wrapping(binding ) of data and member function in a single unit is known as encapsulation. Source:

Answered by: gourav | Date: 3/11/2010 | Contact gourav Contact gourav

the wrapping up of data and code in a single unit known as class is called encapsulation.<br> Source:

Answered by: Gaurav Agrawal | Date: 4/24/2010 | Contact Gaurav Agrawal Contact Gaurav Agrawal

incapsulation means to combine data and methods into a single module in which they are combind with each other. Source:

Answered by: shivani | Date: 5/11/2010 | Contact shivani Contact shivani

Wrapping data and member functions in single unit is called as encapsulation Source:

Answered by: mukund | Date: 5/25/2010 | Contact mukund Contact mukund

binding of data and member function together in a single unit is called encapsulation<br>ex:class Source:

Answered by: BIPIN KUMAR DAS | Date: 5/28/2010 | Contact BIPIN KUMAR DAS Contact BIPIN KUMAR DAS

process of binding the member variable of a class along with member functions. It can be implemented with the help of object and also access modifiers like private, public and protected. Source:

Answered by: Srinivasaraju | Date: 6/20/2010 | Contact Srinivasaraju Contact Srinivasaraju

If you have the better answer, then send it to us. We will display your answer after the approval

Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.

Post your answer here

Inform me about updated answers to this question.
Related Questions
View Answer
What is virtual class and friend class?
View Answer
What do you mean by pure virtual functions?
View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here - Best Freshers & Experienced Jobs Website.

View All Virtual Functions in C++ Interview Questions & Answers - Exam Mode / Learning Mode

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.921875 Seconds