diff between Abstract class Interfaces?
Answers were Sorted based on User's Feedback
Answer / anu mehra
abstract classes contain
1)abstract as well as non abstract method
2) to inherit we use extends keyword
Interface
1) all methods are abstract ,public and static
2) all variables are public , static and final
3) to inherit we use implements keyword
4) interface can extend another interface
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / pramod kumar sharma
abstract class contains the at list one abstract methods and abstract methods contain the only declaration but no definition.
interface contain all methods abstract methods only.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / dhanya
Any class with one or more abstract method is called an abstract class.It can have data attributes,concrete methods and constructors.Abstract class can differ the implementation
by declaring the method to be abstract,and a Java interface declares only the contract and no implementation.All methods declared in interface are public and abstract.All attributes are public,static and final.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / latha
abstract class contains the abstract methods. these methods
contain the only declaration but no definition.
interface is the class which extends the many interfaces.
and the class implements the many interfaces
| Is This Answer Correct ? | 1 Yes | 4 No |
What is an example of genetic polymorphism?
What is the benefit of oop?
Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)
How to reverse a sentence in c program ex: ram is a good boy answer: boy good a is ram
1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)
What is static modifier?
What is the diamond problem in inheritance?
What is the expansion of OOPS?
Why do we need polymorphism in c#?
What is Object and Class? What are the differences between them?
what is the advantage in software? what is the difference between the software developer and Engineer
What is encapsulation in simple terms?