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
how to get the oracle certification? send me the answer
officer say me - i am offered to a smoking , then what can you say
What are classes oop?
What is difference between polymorphism and inheritance?
What is constructor overloading in oop?
What are the advantages of polymorphism?
What is meant by multiple inheritance?
What are the data types in oop?
Write a program to sort the number with different sorts in one program ??
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.
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
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.
What is polymorphism and types?
What are the three parts of a simple empty class?
What does <> mean pseudocode?