Difference between interface and abstract class with ex.

Answer Posted / sreenivas g

Abstract Class : If a class contains atleast one
non-concrete(not implemented) method, it is said to be
Abstract class. it should be defined with keyword abstract.
It is a combination of both implemented and non-implemented
methods.

Interface : By default all the methods in Interface are
abstract methods. All the methods are non-implemented in
interface.

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will be the initial value of an object reference which is defined as an instance variable?

637


Can you access non static variable in static context?

559


What is the use of arrays tostring () in java?

520


How does the garbage collector works in java?

572


can rmi and corba based applications interact ?

670






What is default constructors?

543


Which is better arraylist or vector?

573


What is exception propagation?

592


What is use of set in java?

495


What are different types of references?

532


Can we have try without catch block?

645


How many types of assembly languages are there?

526


What exactly is a .class file?

579


What is the statements?

591


Is java a software?

515