What is the differances between a abstract calss and
interface

Answer Posted / kanan

Abstract class: You can inherit only one class.
Interface: You can inherit more than one interface.

Abstract class: It contains both completed and uncompleted
(abstract) methods.
Interface: It only contains uncompleted methods (methods
without body).

Abstract class: Access modifiers are there for methods and
properties.
Interface: It does not have access modifier for methods or
properties. By default they are public.

Abstract class: Fast
Interface: Require more time to find actual method in classes.

Abstract class: It can contain fields and constants.
Interface: no fields can be defining in interface.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the different types of qualifier in java?

1847


Which type does string inherit from?

618


What do you mean by overloading?

586


What are functions in oop?

586


2. Give the different notations for the class.\

1594






Why is static class not inherited?

601


Why is polymorphism important in oop?

637


What are the types of abstraction?

560


What are the benefits of interface?

583


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2150


What are the benefits of oop?

607


What are the 4 main oop principles?

686


What is inheritance in oop?

605


Is html an oop?

585


What is an example of genetic polymorphism?

653