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 does I oop mean?
What is meant by multiple inheritance?
Which type does string inherit from?
what is the difference between class and object?
what is difference between thread and programme.
Where You Can Use Interface in your Project
What is polymorphism what is it for and how is it used?
what is function over loading?
What are the 4 main oop principles?
what is ns string? what is ns array?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the scope resolution operator while accessing them. I want to know some other advantages of unnamed namespaces...