Answer Posted / dipal mehta
The above one is a right answer but the reader who reads it
for referance plz Note line :
I1 i1=new sample();
i1.add();
This might confusing but It means that We have created
object of I1 interface class but with sample as a assigned
object which is valic in this case.
Now call of i1.add() will call the method of interface I1
which points to or defined in Sample class
This will more clearer if you will append two or three more
simple methods like subtract() and try to call it as above
one which actually a part of Mostly used Multiple
Inheritance funda.
personally speaking it will benefitial to you if try
yourself
Hope readers like tips
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is the difference between function and stored procedure?
Explain cas (code access security)?
What are the similarities and difference between class and structure in .net?
Do you know what is linq?
What is Entity Relationship Model in .NET?
How viewstate is being formed and how it's stored on client in .net?
Tell us the differences between an interface and an abstract class in .net?
What is msil, il?
Explain what is an application domain?
Explain how to redirect tracing to a file?
Will it go to finally block if there is no exception happened?
Tell me what is serialization?
Is .net a compiler?
How we can achieve Connection pooling in .Net?
Difference between abstract class and interface in .net?