C# and .NET step by step with interview questions
Showing posts with label encapsulation. Show all posts
Showing posts with label encapsulation. Show all posts
Saturday, December 3, 2011
Thursday, February 17, 2011
.NET and OOP interview questions :- What is the difference between abstraction and encapsulation ?
.NET and OOP interview questions :- What is the difference between abstraction and encapsulation ?
Answer:
This is a very typical .NET interview question which confuses most of the .NET professionals. Both abstraction and encapsulation look similiar , but they have huge differences between them.
Abstraction is nothing but simplifying objects while encapsulation is hiding complexity.
Encapsulation implements abstraction. Abstraction is a thought process which happens during planning phase. While encapsulation implements abstraction by using access modifiers ( private, public, protected, internal and protected internal).
Get the 500 .NET Interview questions and answers
Subscribe to:
Posts (Atom)