Thursday, September 25, 2008

What is difference in an Abstract Class and an Interface.

Abstract class can contain method definations also.

Interfaces are essentially having all method prototypes no definition

In short Interface is a abstract class having all methods abstract




Total Answers and Comments: 8
Last Update: October 09, 2007

Sponsored Links


Best Rated Answer

Submitted by: Priestly George Varghese


Interface
All methods are abstract and there is no implementation.
No access modifiers are allowed.
Interfaces are essentially having all method prototypes no definition
We can achieve multiple inheritance through interface

Abstract class
Some methods can be concrete.
They have access modifiers
Contain method definitions also.
We can achieve only single inheritance and multi-level inheritance
It can not be instantiated


Above answer was rated as good by the following members:
mvenkatm
September 29, 2005 00:51:05 #1
prateeti
RE: What is difference in an Abstract Class and an Int...

An Abstract class has abstract methods. An Abtsract class can not be instanitiated directly. All the abtract methods are implemented in the derived class. There is no multiple inheritance here.

Interface class also has abstract methods and all of them are public. You can have multiple inheritance with Interfaces.


Is this answer useful? Yes | No
December 09, 2005 10:53:10 #2
sahu Member Since: December 2005 Contribution: 324
RE: What is difference in an Abstract Class and an Int...

Ans:

In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.


Is this answer useful? Yes | No
January 21, 2006 06:17:00 #3
sabir
RE: What is difference in an Abstract Class and an Int...
the interface will have all absract method the absract will contain one or more absract method all the methods the interface has to be implemented but it is not req to implemne t all the methods in absract class

Is this answer useful? Yes | No
February 24, 2006 01:28:38 #4
Arivoli
RE: What is difference in an Abstract Class and an Int...

Interface :

1. All the methods in the interface are abstract.
2. We can achieve multiple inheritance through interface.
3. All the methods in the interface should be without Access modifier. Implicitly public.

Abstract class:

1. Abstract class may contain abstract method and non-abstract method.
2. We can achieve only single inheritance and multi-level inheritance.
3. Abstract methods have Access modifiers.


Is this answer useful? Yes | No
July 05, 2006 06:07:53 #5
munishm Member Since: July 2006 Contribution: 1
RE: What is difference in an Abstract Class and an Int...

An Interface is created/used when we have different types of objects while an abstract class is used when there is a single root hierarchy.


Is this answer useful? Yes | No
August 30, 2006 07:29:47 #6
Devaraja Rao, Ambekar
RE: What is difference in an Abstract Class and an Int...

Abstarct class is like normal class with 2 specials. 1. It can not be instanciated, 2. It can have abstarct functions. Abstract class is used in inheritance as super class, where some common implementation is requried.

Example is Thread class

interface is different type than class. All the members are public and no implementation is allowed. Interfaces are used for 1. For declaring project level constants, because all variables public final and static. 2. In delegation pattern for providing flexibilty of implementation.

Example is runnable interface


Is this answer useful? Yes | No
March 30, 2007 06:04:06 #7
sahu Member Since: December 2005 Contribution: 324
RE: What is difference in an Abstract Class and an Int...

Abstract class:

1. Abstract class may contain abstract method and concrete method(means having own implemantion).
2. Abstract methods have Access modifiers(Public, protected,internal etc).

Interface :

1. All the methods in the interface are abstract.
2. We can achieve multiple inheritance through interface.
3. Donot have access Modifiers by default is PUBLIC


Is this answer useful? Yes | No
October 09, 2007 02:50:58 #8
Priestly George Varghese
RE: What is difference in an Abstract Class and an Int...

Interface

All methods are abstract and there is no implementation.

No access modifiers are allowed.

Interfaces are essentially having all method prototypes no definition

We can achieve multiple inheritance through interface

Abstract class

Some methods can be concrete.

They have access modifiers

Contain method definitions also.

We can achieve only single inheritance and multi-level inheritance

It can not be instantiated


What is difference in Record set and Dataset

Recordset provides data one row at a time.

Dataset is a data structure which represents the complete table data at same time.

Recordset has the logic to update and manipulate data

Dataset is just a data store and manipulation is done through DataAdapters in .NET.






Total Answers and Comments: 12 Last Update: August 28, 2008

Sponsored Links


Best Rated Answer

Submitted by: sibassp


* A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
* A DataSet is designed to work without any continuing connection to the original data source.
* Data in a DataSet is bulk-loaded, rather than being loaded on demand.
* There's no concept of cursor types in a DataSet.
* DataSets have no current record pointer You can use For Each loops to move through the data.
* You can store many edits in a DataSet, and write them to the original data source in a single operation.
* Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.




Above answer was rated as good by the following members:
veluworld
Sorting Options

Page 1 of 2 « First 1 2 > Last »
September 27, 2005 05:39:29 #1
Sachin Kulshreshtha
RE: What is difference in Record set and Dataset

Data Reader worked as conventional Record Set of VB but Data Set Can store a complete database with all the relations and constraints.

Data Reader worked in Readonly where as Data Set provid u the flexibility of Updating data also.

Data Reader worked in connected mode only, whereas Data set works in disconnected mode also.


Is this answer useful? Yes | No
October 05, 2005 05:15:06 #2
Madhuri.ch
RE: What is difference in Record set and Dataset
Apart from wat sachin has said in a dataset is disconnected by default but in a recordset we need to set its feature to disconnected if needed as that property is not default

Is this answer useful? Yes | No
December 24, 2005 20:28:34 #3
revathi_kalaivanan Member Since: December 2005 Contribution: 2
RE: What is difference in Record set and Dataset

Dataset vs Recordset

1.collection of tables VS single table.

2.no need for join to use diff. DB tables VS need join.


Is this answer useful? Yes | No
April 12, 2006 02:07:21 #4
deepak sai nair
RE: What is difference in Record set and Dataset
the main diff betwn recordset and dataset is , recordset is created in the server side so that a connection should be established every time we work on recordset but in case of dataset , it is created in the client side so that there is no need of any connection at the time of working on the dataset which makes the accessing faster.

Is this answer useful? Yes | No
June 19, 2006 07:24:23 #5
Manju D J
What is difference in Record set and Dataset

***The ADO Recordset object is used to hold a set of records from a database table. A Recordset object consist of records and columns (fields).

***Dataset doesn't exist in ADO.






Is this answer useful? Yes | No
July 07, 2006 01:07:21 #6
Madhu.Ch
RE: What is difference between Datagrid and Dataset

Hi

In datagrid we can do editable and in dataset shows data table shows once at a time, but what is the main difference


Is this answer useful? Yes | No
October 30, 2006 05:31:28 #7
vinita tyagi
RE: What is difference in Record set and Dataset

1. Record set is the part or object of connected Architecture, means it needs full time connectivity with database while it is in working.and dataset needs not full time connectivity.it makes connection once and put all data in its cache memory and then no need of connection for doing operation (insert ,update,delete,....).

2.Record set return single row at a time . while dataset return number of rows at a time.




Is this answer useful? Yes | No
March 17, 2007 04:53:36 #8
Madhuri Chavan
RE: What is difference in Record set and Dataset
The main differences are:

>with dataset you can retrieve data from two databases like oracle &sql server & merge them in one dataset,with recordset it is not possible.

>all representation of dataset is using XML while recordset uses COM

>Recordset cannot be transmitted on Http while dataset can be transmitted.

Is this answer useful? Yes | No
May 10, 2007 00:23:48 #9
sibassp
RE: What is difference in Record set and Dataset


* A DataSet can represent
an entire relational database in memory, complete with tables, relations, and
views.
* A DataSet is designed
to work without any continuing connection to the original data source.
* Data in a DataSet is
bulk-loaded, rather than being loaded on demand.
* There's no concept of
cursor types in a DataSet.
* DataSets have no
current record pointer You can use For Each loops to move through the data.
* You can store many
edits in a DataSet, and write them to the original data source in a single
operation.
* Though the DataSet is
universal, other objects in ADO.NET come in different versions for different
data sources.





Is this answer useful? Yes | No Answer is useful 1 Answer is not useful 0 Overall Rating: +1
May 23, 2007 02:52:23 #10
Rajavel
RE: What is difference in Record set and Dataset
RecordSet: ->It requires the db connection throughout the process.
->It represents only very few records, not the entire relational DB.
DataSet:-> It is connectionless ( We can get d data from DB and without depending on the connection we can work on it.

Is this answer useful? Yes | No

No comments: