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
What is the example of polymorphism?
What is the main purpose of inheritance law?
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.
write string class as your own class in java without using any built-in function
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?
when to use 'mutable' keyword and when to use 'const cast' in c++
What is use of overloading?
What is encapsulation c#?
What is oops?what is its use in software engineering?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What are the three parts of a simple empty class?
How to call a non virtual function in the derived class by using base class pointer
What are the components of marker interface?
Why multiple inheritance is not possible?
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(); }