YouTube Icon

Interview Questions.

Top 100+ Oops Interview Questions And Answers - May 31, 2020

fluid

Top 100+ Oops Interview Questions And Answers

Question 1. What Is Oops?

Answer :

OOPS is abbreviated as Object Oriented Programming gadget in which applications are considered as a set of objects. Each item is not anything however an instance of a category.

Question 2. Write Basic Concepts Of Oops?

Answer :

Following are the standards of OOPS and are as follows:.
1.Abstraction.
2.Encapsulation.
Three.Inheritance.
Four.Polymorphism.

Adv Java Interview Questions
Question three. What Is A Class?

Answer :

A magnificence is truely a representation of a sort of object. It is the blueprint/ plan/ template that describe the info of an object.

Question 4. What Is An Object?

Answer :

Object is called as an example of a category, and it has its own kingdom, conduct and identity.

Adv Java Tutorial
Question 5. What Is Encapsulation?

Answer :

Encapsulation is an attribute of an object, and it includes all statistics that is hidden. That hidden records can be limited to the members of that class.
Levels are Public,Protected, Private, Internal and Protected Internal.

J2EE Interview Questions
Question 6. What Is Polymorphism?

Answer :

Polymorphism is not anything butassigning behavior or fee in a subclass to something that became already declared inside the main magnificence. Simply, polymorphism takes a couple of form.

Question 7. What Is Inheritance?

Answer :

Inheritance is a concept where one class shares the shape and conduct defined in every other elegance. Ifinheritance implemented on one magnificence is called Single Inheritance, and if it relies upon on a couple of instructions, then it's miles referred to as multiple Inheritance.

J2EE Tutorial Android Interview Questions
Question eight. What Are Manipulators?

Answer :

Manipulators are the features which may be used in conjunction with the insertion (<<) and extraction (>>) operators on an item. Examples are endl and setw.

Question nine. Define A Constructor?

Answer :

Constructor is a way used to initialize the kingdom of an object, and it receives invoked on the time of object introduction. Rules forconstructor are:.
•Constructor Name need to be identical asclass call.
•Constructor ought to have no return kind.

JavaServer Faces (JSF) Interview Questions
Question 10. Define Destructor?

Answer :

Destructor is a way that is automatically known as while the item ismade ofscope or destroyed. Destructor call is also identical asclass call however with the tilde symbol before the name.

Android Tutorial
Question 11. What Is Inline Function?

Answer :

Inline feature is a method utilized by the compilers and instructs to insert complete frame of the characteristic anywhere that feature is used inside the application supply code.

JSON (JavaScript Object Notation) Interview Questions
Question 12. What Is A Virtual Function?

Answer :

Virtual function is a member characteristic ofclass and its capability can be overridden in its derived magnificence. This feature can be implemented through the use of a key-word referred to as virtual, and it is able to take delivery of all through feature assertion.
Virtual characteristic may be accomplished in C++, and it is able to be done in C Languageby the use of characteristic guidelines or tips to function.

Adv Java Interview Questions
Question 13. What Is Friend Function?

Answer :

Friend feature is a chum of a category this is allowed to get entry to to Public, personal or covered records in that identical magnificence. If the feature is described out of doors the class can't get admission to such facts.
Friend may be declared anywhere within the elegance announcement, and it cannot be tormented by get admission to control keywords like personal, public or blanketed.

JavaServer Faces (JSF) Tutorial
Question 14. What Is Function Overloading?

Answer :

Function overloading is defined as a regular characteristic, but it has the ability to perform different tasks. It allowscreation of several techniques with the same call which range from every different by using type of enter and output of the characteristic.
Example
void upload(int& a, int& b);
void upload(double& a, double& b);
void add(struct bob& a, struct bob& b);

Question 15. What Is Operator Overloading?

Answer :

Operator overloading is a feature in which different operators are applied and depends on the arguments. Operator,-,* may be used to skip via the function , and it has their personal precedence to execute.
Example:
class complex  
double real, 
imag; public: complex(double r, double i) : real(r), 
imag(i)  complicated operator+(complex a, complex b); 
complicated operator*(complicated a, complex b); 
complex& operator=(complex a, complicated b);

a=1.2, b=6

Advanced C# Interview Questions
Question sixteen. What Is An Abstract Class?

Answer :

An abstract magnificence is a class which can't be instantiated. Creation of an object isn't feasible with abstract elegance , but it is able to be inherited. An summary class can incorporate handiest Abstract technique. Java lets in most effective abstract approach in abstract class at the same time as for different language it permits non-summary approach as properly.

JSON (JavaScript Object Notation) Tutorial
Question 17. What Is A Ternary Operator?

Answer :

Ternary operator is said to be an operator which takes 3 arguments. Arguments and results are of various facts sorts , and it's far depends at the function. Ternary operator is likewise known as asconditional operator.

Advanced C++ Interview Questions
Question 18. What Is The Use Of Finalize Method?

Answer :

Finalize approach enables to perform cleanup operations on the resources which are not presently used. Finalize technique is covered , and it's miles handy most effective through this elegance or through a derived elegance.

J2EE Interview Questions
Question 19. What Are Different Types Of Arguments?

Answer :

A parameter is a variable used in the course of the assertion of the characteristic or subroutine and arguments are handed to the characteristic , and it ought to in shape with the parameter described. There are  sorts of Arguments.
•Call via Value – Value handed will get modified simplest inside the characteristic , and it returns the equal value something it is handed it into the function.
•Call by using Reference – Value handed gets changed in each inside and outside the features and it returns the identical or special fee.

 

Object Oriented Analysis and Design Tutorial
Question 20. What Is Super Keyword?

Answer :

Super keyword is used to invoke overridden method which overrides certainly one of its superclass strategies. This keyword lets in to get entry to overridden methods and also to access hidden participants of the superclass.
It additionally forwards a call from a constructor to a constructor inside the superclass.

Basic C Interview Questions
Question 21. What Is Method Overriding?

Answer :

Method overriding is a function that permits sub elegance to provide implementation of a way that is already described inside the most important magnificence. This will overrides the implementation within the superclass by way of offering the equal technique call, identical parameter and same return kind.

Question 22. What Is An Interface?

Answer :

An interface is a group of abstract method. If the class implements an inheritance, and then thereby inherits all of the summary strategies of an interface.

Question 23. What Is Exception Handling?

Answer :

Exception is an occasion that happens at some stage in the execution of a program. Exceptions may be of any kind – Run time exception, Error exceptions. Those exceptions are treated well thru exception dealing with mechanism like strive, trap and throw key phrases.

C# OOPS Interview Questions
Question 24. What Are Tokens?

Answer :

Token is identified by means of a compiler and it cannot be damaged down into thing elements. Keywords, identifiers, constants, string literals and operators are examples of tokens.
Even punctuation characters also are considered as tokens – Brackets, Commas, Braces and Parentheses.

Android Interview Questions
Question 25. Difference Between Overloading And Overriding?

Answer :

Overloading is static binding while Overriding is dynamic binding. Overloading is nothing but the identical technique with exceptional arguments , and it could or may not return the same cost within the equal elegance itself.
Overriding is the identical approach names with identical arguments and go back types buddies with the elegance and its infant class.

Question 26. Difference Between Class And An Object?

Answer :

An object is an instance of a class. Objects preserve any facts , however instructions don’t have any records. Definition of houses and capabilities can be done at elegance and can be used by the item.Class may have sub-training, and an item doesn’t have sub-gadgets.

Asp Dot Net Mvc 4 Interview Questions
Question 27. What Is An Abstraction?

Answer :

Abstraction is a great function of OOPS , and it suggests only the important info to the client of an object. Means, it suggests simplest necessary information for an item, not the inner info of an object. Example – When you want to exchange On tv, it not necessary to reveal all of the functions of TV. Whatever is needed to interchange on TV could be confirmed by using the use of abstract class.

JavaServer Faces (JSF) Interview Questions
Question 28. What Are Access Modifiers?

Answer :

Access modifiers decide the scope of the approach or variables that may be accessed from different numerous objects or lessons. There are five types of get admission to modifiers , and they're as follows:.
•Private.
•Protected.
•Public.
•Friend.
•Protected Friend.

Question 29. What Is Sealed Modifiers?

Answer :

Sealed modifiers are the access modifiers where it can't be inherited with the aid of the methods. Sealed modifiers can also be applied to residences, occasions and methods. This modifier can't be applied to static individuals.

Object Oriented Analysis and Design Interview Questions
Question 30. How Can We Call The Base Method Without Creating An Instance?

Answer :

Yes, it's miles possible to call the bottom approach without creating an example. And that method ought to be,.Static approach.Doing inheritance from that elegance.-Use Base Keyword from derived elegance.

Question 31. What Is The Difference Between New And Override?

Answer :

The new modifier instructs the compiler to use the new implementation instead of the base magnificence feature. Whereas, Override modifier helps to override the base class function.

Question 32. What Are The Various Types Of Constructors?

Answer :

There are three various forms of constructors , and they may be as follows:.

Default Constructor – With no parameters.
Parametric Constructor – With Parameters. Create a new example of a class and also passing arguments simultaneously.
Copy Constructor – Which creates a brand new object as a duplicate of an existing item.
Asp Dot Net Database Interview Questions
Question 33. What Is Early And Late Binding?

Answer :

Early binding refers to assignment of values to variables at some point of design time while late binding refers to assignment of values to variables at some stage in run time.

JSON (JavaScript Object Notation) Interview Questions
Question 34. What Is ‘this’ Pointer?

Answer :

THIS pointer refers to the present day item of a category. THIS key-word is used as a pointer which differentiates among the cutting-edge object with the global item. Basically, it refers to the modern-day object.

Question 35. What Is The Difference Between Structure And A Class?

Answer :

Structure default get entry to type is public , but class get right of entry to kind is personal. A shape is used for grouping records while elegance can be used for grouping information and methods. Structures are solely used for dataand it doesn’t require strict validation , but training are used to encapsulates and inherit statistics which calls for strict validation.

Question 36. What Is The Default Access Modifier In A Class?

Answer :

The default get right of entry to modifier of a class is Private with the aid of default.

Advanced C# Interview Questions
Question 37. What Is Pure Virtual Function?

Answer :

A pure digital function is a characteristic which may be overridden within the derived classbut can't be described. A digital feature may be declared as Pure with the aid of the use of the operator =0.

Example:
Virtual void function1() // Virtual, Not natural
Virtual void function2() = zero //Pure virtual

Question 38. What Are All The Operators That Cannot Be Overloaded?

Answer :

Following are the operators that can't be overloaded -.
1.Scope Resolution (:: )
2.Member Selection (.)
three.Member choice through a pointer to characteristic (.*)

Question 39. What Is Dynamic Or Run Time Polymorphism?

Answer :

Dynamic or Run time polymorphism is likewise referred to as approach overriding wherein name to an overridden characteristic is resolved in the course of run time, no longer on the bring together time. It approach having  or more strategies with the identical name,same signature but with distinct implementation.

Question 40. Do We Require Parameter For Constructors?

Answer :

No, we do not require parameter for constructors.

Advanced C++ Interview Questions
Question 41. What Is A Copy Constructor?

Answer :

This is a special constructor for developing a new object as a duplicate of an existing item. There might be usually only on copy constructor that can be either described by the consumer or the gadget.

Question forty two. What Does The Keyword Virtual Represented In The Method Definition?

Answer :

It way, we are able to override the technique.

Basic C Interview Questions
Question forty three. What Are Base Class, Sub Class And Super Class?

Answer :

Base elegance is the most generalized elegance , and it's far stated to be a root class.
Sub elegance is a class that inherits from one or greater base lessons.
Super class is the determine class from which another class inherits.
Question 44. What Is Static And Dynamic Binding?

Answer :

Binding is not anything but the association of a call with the elegance. Static binding is a binding in which call can be related to the elegance all through compilation time , and it is also referred to as as early Binding.
Dynamic binding is a binding in which name may be associated with the elegance at some stage in execution time , and it is also called as Late Binding.

Question 45. How Many Instances Can Be Created For An Abstract Class?

Answer :

Zero times will be created for an abstract elegance.

Question 46. Which Keyword Can Be Used For Overloading?

Answer :

Operator key-word is used for overloading.

Question forty seven. What Is The Default Access Specifier In A Class Definition?

Answer :

Private access specifier is used in a class definition.

Question forty eight. Which Oops Concept Is Used As Reuse Mechanism?

Answer :

Inheritance is the OOPS idea that may be used as reuse mechanism.

Question 49. Which Oops Concept Exposes Only Necessary Information To The Calling Functions?

Answer :

Data Hiding / Abstraction

Question 50. What Are The Types Of Constructors?

Answer :

Basically constructors are 5 kinds the ones are

Default Constructor
Parameterized Constructor
Copy Constructor
Static Constructor
Private Constructor




CFG