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

Explain the difference between extends thread vs implements runnable in java?

809


Can we execute a program without main?

752


What is difference between word and integer?

805


Which is better 64 bit or 32 bit?

695


What are the 8 data types in java?

741


Can we override private method in java?

834


What is the difference between actual and formal parameters?

707


Can we override the private methods?

735


What is getkey () in java?

785


Can you call a method on a null object?

763


What is data type in computer?

709


How do you declare an array in java?

744


Explain the pointers in Java?

809


How does system arraycopy work in java?

838


What is a list in java?

720