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
Explain the difference between asp.net and asp?
What is meant by localization?
What are the difference bbetween value type & reference types ? Example from .net. Integer & struct are value types or reference types in .net?
What is a .net class?
Is .net core free?
I am constantly writing the drawing procedures with system.drawing.graphics, but having to use the try and dispose blocks is too time-consuming with graphicsobjects. Can I automate this?
What are the improvements made in cas in .net 4.0?
Explain .NET architecture?
Explain clr, cts and cls?
What is singleton activation mode in .net?
What is the difference between override and overload in a method?
How server form post-back works?
Explain dataset.acceptchanges and dataadapter.update methods in .net?
What is the difference between constants and read-only variables?
What should you do to store an object in a viewstate?