What is the difference between and interface and an
abstract class ?

Answer Posted / sathish kumar.t

ABSTRACT CLASS Interface

It consist of Static It consist of non- static member
member variables variables

It consist of non-abstract It consist of only abstract
and abstract methods methods

it consist of private and It consist of public classes
protected classes

It uses the keyword Extends uses the keyword Inplements

If subclass extends the If the subclass implements
abstact class, cannot extend interface, can implement any
any other class number of interfaces

Is This Answer Correct ?    19 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the example of polymorphism?

653


What is the main purpose of inheritance law?

765


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.

2674


write string class as your own class in java without using any built-in function

2061


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1491






when to use 'mutable' keyword and when to use 'const cast' in c++

1742


What is use of overloading?

726


What is encapsulation c#?

695


What is oops?what is its use in software engineering?

630


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2101


What are the three parts of a simple empty class?

1606


How to call a non virtual function in the derived class by using base class pointer

5569


What are the components of marker interface?

703


Why multiple inheritance is not possible?

681


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2077