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

Can we create object of interface?

602


Why oops is important?

612


Why is oop useful?

602


What does I oop mean?

616


What are the three main types of variables?

600






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.

699


What is data binding in oops?

586


How does polymorphism work?

635


What are the types of abstraction?

555


what type of question are asked in thoughtworks pair programming round ?

1762


what's the basic's in dot net

1738


What is the difference between encapsulation and polymorphism?

594


What is the renewal class?

2165


What is a superclass in oop?

667


What are the 4 pillars of oop?

670