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 |
In Bioinformatics, a DNA sequence is made up of a combination of 4 characters, namely “A,C,G,T”. A subsequence of a given sequence of characters a0, a1, …an- 1, is any subset of the characters taken in order, of the form ai0 , ai1 ,…..aik-1 where 0 ≤ i0 <i1….< ik-1 ≤ n-1. For example in the sequence “A,C,G,T,G,T,C,A,A,A,A,T,C,G”, we can have subsequences “A,G,T”, “A,C,A,A” and many more. A subsequence is palindromic if it is the same whether read left to right or right to left. For instance, the sequence “A,C,G,T,G,T,C,A,A,A,A,T,C,G”, has many palindromic subsequences, including “A,C,G,C,A” and “A,A,A,A” (on the other hand, the subsequence “A,C,T” is not palindromic). Devise an algorithm (using dynamic programming) that takes a sequence of characters X[0 … n-1] from the alphabet set (A,C,G,T) and returns the (length of the) longest palindromic subsequence. Implement the algorithm in an appropriate language.
it is a language or tools?
what is the purpose of postback?
What is the language used for Artificial Intelligence?
Q1.Write a C program which asks the user for a number between 1 to 9 and shows the number. If the user inputs a number out of the specified range, the program should show an error and prompt the user for a valid input.
how we define two jobs have same name??is it exist??
How do i find out the number of parameters passed into function?
Diff between %let and Call symput?
I'm new to ABAP. What is Module pool in SAP?
Given three sides of a triangle. Write the Program to determine whether the triangle is : 1) Invalid 2) Right Angled 3) Isoscales 4) Equilateral 5) Not Special An Isoscales right angled triangle should be taken as a Right Angled Triangle
3 Answers FFC, Goldman Sachs, Student,
can we use commit,rollback in triggers and how?
hai i like to do some certifications in programming or any other......... am doing my IT third year......... pls guide me...... mail me ur suggestions to ranjithmaharaj@gmail.com...