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

Why we used vector class?

840


Which list does not allow duplicates in java?

726


Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

7892


Can you call a method on a null object?

774


What is meant by string is immutable?

746


What is flush buffer?

761


When can an object reference be cast to an interface reference in java programming?

790


Why do we need strings in java?

721


What are the advantages of autoboxing?

764


Is null in java?

766


What is files manifesting?

1984


What is the concatenation operator in java?

836


Can we declare the main method of our class as private?

776


How do you find the independent variable?

750


What is a default method?

770