Which among the following two is best and why? Abstract
Class and Interface. What is the major difference in between
those two except the discrete methods and methods with
function definition.
Answers were Sorted based on User's Feedback
Answer / anitha
a)for Future, we can provide extra services in Abstract
Class ,these futures can able to access all of its
Clients. And also it supports reusability.
suppose the implementer need not provide implementation
for all the methods.
Where as in Interface we don’t have this future(reusability
and extra servicess).
each implementer need to provide
implementation for all the methods and
also we cont provide extra services in
future.The interface should be constant.
b)Interface can support multiple inheritance where as
abstract class does not.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / avinash
Interface:
Can inherit more than one Interface.
Cannot contain concret Methods.
Cannot specify Access Modifiers.( by default all are Public)
Abstract:
Cannot inerit more than one abstract class.
Can contain concrete Methods.
Can specify Access Modifiers.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / jignesh contractor
(1) Interface have no concrete methods implemented while
abstract class can have.
(2) Interface can come into the chain of inheritance while
Abstract class can't.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / annn
Interface:
Cannot have access modifier
Cannot have concrete methods
Is a part of inheritance
we can create a object of interface
Abstract:
Can have access modifier
Can have concrete methods
Is not a part of inheritance
we cannot create a object of interface
Is This Answer Correct ? | 1 Yes | 1 No |
Tell me what is serialization?
What is Ajax design pattern in .NET?
How to convert a .NET object into COM operabililty?
0 Answers Petranics Solutions,
Explain the two different types of typecasting?
How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?
Best Dot Net Center in Chennai ?
What is connected and diconnected database ?
Explain how viewstate is being formed and how it's stored on client in .net?
How can we convert XML data into DataBase table IN .Net?
Will it go to finally block if there is no exception happened?
What is typical about a windows process in regards to memory allocation in dot net?
How will you load dynamic assembly? How will create assemblies at run time?
0 Answers InfoAxon Technologies,