what are the diffrences between interface and abstract
class?

Answer Posted / ravikiran

interface is a purely abstract one when we wish to
implement all the methods for different scenarios in
different places we make use of implementation of the
interface.
abstract class is the one which contains both abstract as
well as non abstarct methods,We will define this if you
want ot restrict the instantiation of the class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Justify your answer that you can't define a method inside another method in java, if you can then how?

606


What is the difference between yield() and sleep()?

543


Why you should not use singleton?

542


How can you traverse a linked list in java?

682


What is a boolean flag in java?

567






What is the += operator called?

579


What is collection api?

610


Can we override a variable in java?

549


What are abstract classes and anonymous classes?

643


Can we call a non-static method from inside a static method?

561


Why we override equals() method?

567


What is difference between string and new string?

542


what is difference betweem home interface and remote interface?

2116


What type of variable is gender?

550


What is the purpose of garbage collection in java? When is it used?

539