InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is class member or member of class |
|
Answer» The properties ,events, variables and METHODS define in class are called members of class.There are LOTS of types members in the class. |
|
| 2. |
Can we create a instance of abstract class object |
|
Answer» As all of us know abstract method have not any implementation they have only DECLARTION as in below example we have two CONSTRUCTOR and one declartion of method sum nad below is another CLASS where we TRY to create its instantiate and we will get error |
|
| 3. |
Types of Inheritance OOPS |
|
Answer» Below are the 5 diferent types of inheritance USED in oops. |
|
| 4. |
what is constructor and its types with example |
|
Answer» Constructors are special methods that are used to initialize an object (INSTANCE) of a class. We donot have to define a return type for it because Constructors doesnot return anything. One of the most IMPORTANT thing of Constructors is that it has the same name as class. One important thing is that it must follows the access scope ( for exam private,protected, public, Internal and external).we can also overload Constructor. A class can have any number of constructors. Below is the one of simple example of Constructors |
|
| 5. |
Function or Method Overload Ways with Example |
|
Answer» If any class which have multiple methods with same name but have DIFFERENT parameters then they are said overloaded. In Function OVERLOADING we use the same name for different functions to do same or different operations on same class. |
|
| 6. |
difference between classes and struct |
|
Answer» (1)Struct always are value type on the other side class is a reference type. |
|