Difference between abstract class and Interfaces in Java
Answers were Sorted based on User's Feedback
Answer / surendrareddy
abstract clas have both abstract methods and Concrete methods.
but interface have only abstract methods,
And also abstract class have construtor,but interface
doesn't have.
| Is This Answer Correct ? | 48 Yes | 9 No |
Answer / guest
abstract classes can have other concrete methods but
inteface only abstract methods.
| Is This Answer Correct ? | 35 Yes | 4 No |
Answer / manish sharma
Abstract classes Interfaces
Abstract classes are used only when there is a “is-a” type
of relationship between the classes. Interfaces can be
implemented by classes that are not related to one another.
You cannot extend more than one abstract class. You can
implement more than one interface.
Abstract class can implemented some methods also.
Interfaces can not implement methods.
With abstract classes, you are grabbing away each class’s
individuality. With Interfaces, you are merely extending
each class’s functionality.
| Is This Answer Correct ? | 24 Yes | 4 No |
Answer / your friend
abstract classes can have any type of medthods but
interface allows only abtract methods.
Interface is like a class not a class .
| Is This Answer Correct ? | 19 Yes | 8 No |
Answer / venkateswarlu dhaninkula
Interfaces consists of pure abstract methods
but not abstract class
abstract class having both abstract methods and non
abstract methods
interfaces declare all variables are final and public
but not abstract class
abstract class has a default constructor
but not interface
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / megha mokawat
Abstract class can have non-final variable aslo
but in interface variable are final by- default
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / narasimha raju
An abstract classes can have concrete methods and declares
abstract method which method can implement in different
ways. whereas in interface all are abstract methods.
in abstract class we can declare any type of variable
but in interface all are final variables.
| Is This Answer Correct ? | 8 Yes | 5 No |
Answer / krishna
In Abstract class should implementation methods information
with complete i.e Programmer duty .
But in Interfaces we can give implementations to End-User .
| Is This Answer Correct ? | 0 Yes | 0 No |
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.
Hi, I'm doing B.com 3rd year. Simultaneously I'm doing software engineering in a private institution. I would like to know whether my B.com graduation alone is enough to get me a job in the IT field or should I do some PG course not MBA... suggest me...
you have a computer with 80GB hard disk and ubuntu 8.04 is installed on entire hard disk.now you have to create a seprate partition for windows OS and install win XP as dual boot.write down the steps involved along with the commands
1 Answers Anand Group, Indian Navy, TCS,
Write a shell program to test whether a given year is leap year or not ?
1.What is difference between symget and & in sas? 2.what is difference between callsymput and %let?
diffrence between oracle apps , .NET , SAP
What r the attributes using in Win Runner?
0 Answers Tavant Technologies,
What is the Difference between in memory database and physical database
EXPLAIN UNARY OPEARATORS
Can we write a method in JSP.If so how?
1.how to deploy the Maven application in weblogic server? 2.In Real time projects all classes are singleton or some classes only singleton explain? 3.what are the major uses of the designpatterns? 4.explain restful &Soap based services explain?