What is the difference between Abstract Class and Interface

Answer Posted / guest

An abstract class can have instance methods that implement a
default behavior. An Interface can only declare constants
and instance methods, but cannot implement default behavior
and all methods are implicitly abstract. An interface has
all public members and no implementation. An abstract class
is a class which may have the usual flavors of class members
(private, protected, etc.), but has some abstract methods.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a functional interface?

549


What is token in java?

533


Explain about abstract classes in java?

588


How does finally block differ from finalize() method?

589


How do you check if a string is lexicographically in java?

503






What is pre increment and post increment in java?

503


What is the purpose of extern variable?

539


What is lambda programming?

498


Can we use switch statement with strings?

622


Is 9 a prime number?

470


What is meant by object oriented programming – oop?

544


How do I type unicode?

540


what is instanceof operator used in java?

597


What are the differences between checked exception and unchecked exception?

526


Explain the difference between arraylist and linkedlist in java?

486