What is difference between Abstract Class and Interface?
Answers were Sorted based on User's Feedback
Answer / dhinesh
If a class has one abstract method ,the class has to be an
abstract class.
Methods can be implemented in abstract class.
Whereas a interface is like a abstract class...the only
difference being that the methods are never implemented in
Interface.
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / basudev pradhan
i) Abstarct is class does not have Body part,it can't create
instance ,but We provide Abstact method and normal
method,the abstarct can be inheritaed by another class,this
can must be implemented by Abstarct method,
ii) Abstarct class can only once inheritaed by Another class
But the interface can implements the More than one interface,
interface only provide Abstarct method ,this method have
does not body part,this class can implements the interface
Define the absract method
Is This Answer Correct ? | 2 Yes | 1 No |
Abstract class is a class in which it will contain both the
abstract and non-abstract methods.The abstract class must
be inheritable by another class. In vb.net it will be
defined using mustinheritable keyword.
The syntax is :
Public MustInheritable Class classname
Interface is a class in which it will contain only the
abstract methods. The interface can be implemented or not
by the another class.The functions in interface will be
implemented by the another class which implements the
interface.
The syntax is :
Public Interface interfacename
Is This Answer Correct ? | 1 Yes | 0 No |
how many server controls are presented in vb.net
What is the main purpose of garbage collector?
Display a roll having minimum marks in two subjects?
Explain code security?
How does vb.net achieve polymorphism?
I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com
What is code access security?
Where would you use Abstract class and Interface?
What is the significance of delegates?
I want to reduce my CPU Usage when I am querying the Database for records. Now my Winform App(in VB.Net) suddenly Jumps to 100% CPU Usage when i query for records from sql server database. I want this Usage to be less. Any help is appreciated
Explain option strict?
How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently