what is difference between abstract and interface?
can i give real time example for the two topics?

Answer Posted / richa

abstract class can have some concrete methods and abstract
methods too.abstract class can use accessibility modifier
in abstract class.
but in interface all the method are abstract.In interface
no accessibility modifier is allowed by default it takes
public access modifier.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is %02d?

620


What are green threads in java?

614


Can we rethrow the same exception from catch handler?

630


Can we have 2 main methods in java class?

600


What is difference between printf and scanf?

584






What do you mean by thread safe?

617


What is the use of pattern in java?

581


Define array. Tell me about 2-D array.

657


what is daemon thread and which method is used to create the daemon thread? : Java thread

600


Can an arraylist be empty?

628


What is abstract class constructor called?

649


What is indexof in java?

592


What does \ mean in regex?

704


What is a singleton in genetics?

649


Why hashmap is used in java?

617