what is the difference between abstract class and
Interface?where we can use it in realtime projects?

Answer Posted / nanda

diff b/w abstract class and interface
1.Abstract class contain both normal fn as well as Abstract
fn wheras Interface can define only abstract fn.
2.by default declared variable in interface is static and
final.
in realtime projects we use inerfaces in AWT OR SWING,where
we implement the inerfaces and use them

Is This Answer Correct ?    30 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

769


Define canvas?

743


What is a layout manager and what are different types of layout managers available in java awt?

944


Explain about instanceof operator in java?

795


What is the generic class?

704


What is a jit compiler?

844


What is compareto () in java?

709


How does indexof work?

718


Explain about doubly linked list

817


Can a class have multiple superclasses?

773


What is the flag in java?

791


Can arraylist contain null values?

742


What are different types of references?

743


What is the memory leak in java?

728


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

787