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

how to get the oracle certification? send me the answer

1658


officer say me - i am offered to a smoking , then what can you say

1574


What are classes oop?

593


What is difference between polymorphism and inheritance?

611


What is constructor overloading in oop?

597






What are the advantages of polymorphism?

568


What is meant by multiple inheritance?

729


What are the data types in oop?

597


Write a program to sort the number with different sorts in one program ??

1910


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2567


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1610


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1783


What is polymorphism and types?

594


What are the three parts of a simple empty class?

1447


What does <> mean pseudocode?

618