Friday 6 September 2013

Top 10 oops interview questions


Most Important interview Questions about OOPS

object oriented programming.

  1. What is Encapsulation ??


So, what to say to interviewer when they ask you about Encapsulation?

Well, Tell them that -

Encapsulation means putting together all the "variables" and the "functions" into a single unit called CLASS .
  
Encapsulation also means hiding data and methods within an object.

2. What is inheritance

Inheritance is a feature of oops in which one class acquire behaviour from another class and it can also modify that behaviour according to its needs. Inheritance helps in code re-usability and avoids duplicate code.


3. What is abstraction.

Abstraction means showing relevant data only. Abstraction deal with what to show to things which are outside the class.

4. what is Polymorphism .
Polymorphism is an ability of operator or function to exists in more than one form.We have two types of polymorphism i.e run time and compile time polymorphism.

Run time polymorphism deals with binding of data at run time. Linking of definition of code with the calling function is done at run time.

Compile time polymorphism deals with binding of data at compile time.



More questions coming soon !!

1 comment: