Difference between abstract class and Interfaces?

Answer Posted / hema

Abstract Class is the Class where it can have Methods with
both Definition and Declaration.

Method Declaration: public void Display();
Method Definition: public void Add(){ ..code goes on here...}

When all the methods in a class are only Declared then it is
Interface.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is array pointers ?

822


What is an argument in java?

721


What does system.gc() and runtime.gc() methods do?

834


What are benefits of java?

821


how are methods defined?

813


Explain different ways of creating a thread?

783


Can we override final method?

771


What are the data types supported by java? What is autoboxing and unboxing?

781


What is used of static keyword in java?

796


What is difference between fail-fast and fail-safe?

899


What is a function in programming?

796


Explain the difference between abstract class and interface in java?

768


Can an anonymous class be declared as implementing an interface and extending a class in java programming?

920


Is null keyword in java?

744


How do you create a null object?

805