what is difference between abstraction and interface?

Answer Posted / kavitha

Abstract classes define methods and interfaces declare
methods.
Interfaces declare methods without implementation.
Abstract classes are very much useful when there is a same
functionality across various classes.
Interfaces are useful for classes which varies in
functionality and with the same method signature.

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what happens when a thread cannot acquire a lock on an object? : Java thread

629


What is unmodifiable collection in java?

593


Write a program in java to create a doubly linked list containing n nodes.

643


Explain about doubly linked list

720


How do generics work?

611






Tell me the latest versions in java related areas?

676


What do you mean by order of precedence and associativity?

631


What is floor math?

595


How does queue work in java?

616


Explain java code for recursive solution's base case?

665


What does pointer mean?

646


What is a substitution variable?

653


What is the difference between jfc & wfc?

692


What makes a function well defined?

640


How is Object Oriented Programming different from Procedure Oriented Programming?

702