OOPS QUESTIONS ANSWERS:-
1. We have two classes BaseClass and childClass, ChildClass inheret base class. If we make the object of child class then which class counstructor called first? Ans: Base class constructor will be call first. 2. Can we declare an Abstract method in non-abstract class? Ans: No 3. Can we give the return type of constructor? Ans: No 4. If we have an abstract method in base class, then we must need to override(or use new keyword) it or not? Ans: Yes, if we not override it then it give error. 5. We know that Base class constructor called first. But if we creating object with parameters, and base class have both constructor default and parameterized, then which base class constructor call first. Ans: Base class default constructor called first. 6. Then what you can do that base class parameterized constructor call first. Ans: We can use "Base" keyword |
|||
04-27-2013, 05:54 PM
(This post was last modified: 04-27-2013 05:54 PM by vikas.ahlawat.)
Post: #1
|
|||
Nice Post!!
No comments:
Post a Comment