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

Answer Posted / neha thakur

abstract class contains all abstract method or all concrete
method or combination of both. we can not directly create
object of abstract class.abstract class methods must
implemented in sub class.

interface contains declared method but does not contain body
of method.like abstract class we can not create instance of
interface.methods defined in interface are public &
implicity called as abstract method & interface must be
implemented in the classes with implements keyword which
contains implementation of methods

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you trim a space in java?

505


What is factor r?

529


Can a class be declared as static?

685


What is static and final keyword in java?

577


Can extern variables be initialized?

516






How many bits is a string in java?

583


What is __ init __ functions?

553


What is return in java?

560


What are untrusted applets?

592


What is the major advantage of external iteration over internal iteration?

617


what is thread? What are the high-level thread states? : Java thread

794


What methodology can be employed to locate substrings inside a string?

534


What methods are used in Servlet?Applet communication?

1669


How will you load a specific locale?

540


Is an array a vector?

558