Udemy logo

oopsinterviewquestionsMost major programming languages in use today like Java, C++ and Visual Basic are all object-oriented. Hence a large chunk of programs written today employ Object Oriented Programming (OOP) in one form or another. Programmers specializing in OOP languages are in high demand. Are you one of them? Do you want to be one of them? Programming is fun and pays well at the same time. Yet most people are afraid of it, simple because they don’t know it, and they don’t know how to get started. Today there are many resources available online to help you learn, whether you are trying to master C++ , learn Java, or write your own iOS application.

Yes, it’s always hard to impress the interviewer, beat the competition and land the job! To help you crack the OOP interview, we have put together a list of basic OOPs questions that you’re likely to be asked. Remember, most interviewers want to make sure you have a good grasp on the basics, so that they know they can move you on to more complex stuff. It always helps to have a programming portfolio say a game on Android or an iPhone App to your credit, to back up your claims.

1. What is Object-Oriented Programming?

This is probably the first question you’ll be asked. Object-Oriented Programming, as the name suggests, deals with Objects. Objects are used to emulate real world objects, and then they are assigned to a class. An object will have attributes and behaviour similar to the other objects in the class. OOP is focused on manipulating these objects, through a collection of classes and methods, to get the desired result. OOP can be used for complex tasks and for creating large amounts of structured and interlinked code.

2. What is an Object in OOP?

An Object in OOP is a basic member of a class. It often resembles real world objects (pen, car, etc.) It is the basic instance of a class, and it has its own attributes, identity and state. The operator “new” is used to create an object in OOP languages.

3. What is a Class in OOP?

A class typically includes several member objects. A class will describe the behaviour and attributes of its member. It will also describe the methods that can be used to manipulate its objects. This represents  a class as a template, or a basic representation, of its member objects.  A class is typically a universal concept. For example, if you have objects that are mammals, amphibians and invertebrates, the class could be Animals.

4. What are the Attributes of OOP/ what are the Features of OOP?

Basic concepts of OOPs revolve around the following

There are four basic attributes of OOP:

Class OldClass

Class NewClass : Class OldClass{}

5. What are the types of Inheritance in OOP?

There are four types of inheritance in OOP:

6. Can you Prevent Inheritance?

Yes, you can prevent inheritance through the use of sealed modifier. Sealed can prevent the inheritance of a class or a method. For example:

Class Books {}
sealed class Fiction : Books {}

7. Have you heard of bindings? What are Static and Dynamic Binding?

Binding is associating a name with a class, during or after compilation of a program. Binding done during the compilation time is known as static binding. Binding done during the execution of the program, after the code has been writing, is known as dynamic binding.

Remember, this is just the tip of the iceberg. To improve your chance of clearing the programming round, make sure you’ve practised coding as well! It’s very likely you will have to write a complex program or two in addition to answering questions!  Don’t forget that the interviewer will also be evaluating you based on your presentation, your communication skills, your aptitude, your approach to problem solving and a host of other parameters. Make sure you keep your cool and come across as calm, confident and capable.  What are you waiting for  now? Go ace that interview!

Page Last Updated: January 2014

Top courses in Object Oriented Programming

Object Oriented Programming students also learn

Empower your team. Lead the industry.

Get a subscription to a library of online courses and digital learning tools for your organization with Udemy Business.

Request a demo