Difference between abstract class and Interfaces?
Answer Posted / taresh nama
• Interfaces provide a form of multiple inheritances.
A class can extend only one other class.
• Interfaces are limited to public methods and
constants with no implementation. Abstract classes can have
a partial implementation, protected parts, static methods,
etc.
• A Class may implement several interfaces. But in
case of abstract class, a class may extend only one
abstract class.
• Interfaces are slow as it requires extra
indirection to to find corresponding method in in the
actual class. Abstract classes are fast.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many bits is a string in java?
What is array command?
What's the purpose of static methods and static variables?
What is internal iteration in java se 8?
Why is java logo a cup of coffee?
Can we use this () and super () in a method?
What are voids?
What is palindrome in java?
What are JVM.JRE, J2EE, JNI?
Why to use nested classes in java?
What are the basic concepts of OOPS in java?
How do you calculate roots in java?
List some oops concepts in java?
Is there any tag in htm to upload and download files?
What is fundamental datatype?