What is differance between Abstract and Interface

Answer Posted / poorna chandar rao

diffrence bettwen the abstract class and interfaces

abstract class is having abstarct methods and concrete
methods abstarct class as compulosry having subclass for the
implementation abstarct methods and abstarct does not
support multiple inheritence
because one subclass extend the abstract class their is no
scope for extends for another class because it is not
support for the multiple inheritence
ex 1: abstract class one
2 class two extends one extend three (not valid)

but interface having only method signature in the interface
their is concrete method and it supports the multiple
inhirtence because

ex: interface one
class two implements one extends three(valid)
onc class implemens the interface and extends to another
class that is support the multiple inhertince

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pure oop?

886


Can static class have constructor?

822


What is polymorphism used for?

806


Why do we need polymorphism in c#?

914


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

986


How do you answer polymorphism?

830


What is new keyword in oops?

821


Why do we need oop?

907


What is protected in oop?

841


What is pointer in oop?

766


What does it mean when someone says I oop?

849


What is the oops and benefits of oops programming?

778


How do you achieve polymorphism?

858


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2093


What are functions in oop?

817