Q:
What is oops and what are the different properties provided by oops?
belongs to collection: Top 100 C# interview questions and answers 2022
Top 100 C# interview questions and answers 2022
- What is a C# programming language?
- What are the types of comment in C# with examples?
- What is a class in c#?
- What is an object?
- What is the relation between class and objects?
- List some of the advantages of C#?
- What are IDE’s provided by Microsoft for C# development?
- What is the difference between a struct and a class in C#?
- What are the similarities between a struct and a class in C#?
- What is oops and what are the different properties provided by oops?
- The Differences between Abstraction and Encapsulation in C#?
- Explain sealed class in C#?
- What are value types in C#?
- What are reference types in C#?
- What is the difference between value types and reference types?
- How do you get the size of value type?
- What are different types of the parameter in c#?
- What is the difference between “out” and “ref” parameters in C#?
- List out the differences between Array and ArrayList in C#?
- Why we use keyword “const” in C#.
- What are Access Modifiers in C#?
- How is the exception handling done in C#?
- Can we execute multiple catch blocks in C#?
- What is Jagged Array in C#?
- What is the purpose of using statement in C#?
- How to sort an array in C#?
- Is multiple inheritance supported in C#?
- What is the difference between while, do while and for loop?
- What is the difference between “constant” and “readonly” variables in C#?
- What is the difference between dispose and finalize methods in c#?
- What is the difference between string and StringBuilder in c#?
- List out some of the exceptions in C#?
- What do you mean by the delegate in C#?
- What are the types of delegates in C#?
- What is Nullable Type in C#?
- What do you mean by boxing and unboxing in C#?
- Can “this” be used within a static method?
- Explain is an interface class?
- Explain Abstract class?
- What is the difference between Interface and Abstract class?
- What is the difference between static & dynamic polymorphism?
- What are the ways a method can be overloaded?
- Explain ‘Virtual’ Keyword?
- What is generics in C#.NET?
- How do you inherit a class into other class in C#?
- What is the difference between is and as operators in c#?
- What are the differences between static, public and void in C#?
- What is the difference between methods – “System.Array.Clone()” and “System.Array.CopyTo()” ?
- Explain Partial Class in C#?
- What are the collection types can be used in C#?
- What is multitasking?
- What is Multi-Threading?
- What is a thread?
- How can we change the priority & what the levels of priority provided by .Net?
- How can you reference current thread of the method?
- What is thread.sleep() in threading?
- How can you make a thread sleep for infinite time?
- What is suspend & Resume in Threading?
- What is the difference between sleep & suspend?
- How to stop the long running thread??
- What is Thread.Join in threading?
- What is serialization?
- What is object pool in .Net?
- What are circular references?
- What is Hashtable in C#?
- What is Constructor Overloading in C#?
- What are indexers in C#?
- How to implement singleton design pattern in C#?
- Name the compiler of C#?
- Which string method is used for concatenation of two strings in c#?
- What is the difference between “continue” and “break” statements in C#?
Answer:
Oops stands for object oriented programming system. It is a problem-solving technique to think real world problems in terms of objects.
Following are different properties provided by oops
Inheritance: It is a process of forming new class from the existing class.
Example: A scientific calculator is an extended form of a calculator. Here, the calculator is the parent & scientific calculator is child object.
Polymorphism: The ability to use an operator or functions in different ways giving different meaning to function to the operator is called polymorphism.
Example: A person is behaving like a Child, professor, student and then as a clerk. This is the power of polymorphism, a single object behaves in different forms.
Encapsulation: Encapsulate means to hide also called as data hiding. Encapsulation is used to hide the code & data in a single unit. It is a process of hiding all the internal details of an object from the outside world.
Example: Capsule: Capsule which hides medicine inside it.
Abstraction: Abstraction means showing only necessary information & hiding unnecessary information from the user. Abstraction let you focus on what object does instead of how it does it.
need an explanation for this answer? contact us directly to get an explanation for this answerExample: Suppose you have a car, and u are riding car, now when you apply break you know that car is going to stop but you don’t know what is the process happened when you applied break. Abstraction means putting all the variables and methods in a class that is necessary.