Exforsys
+ Reply to Thread
Results 1 to 2 of 2

Interface and Absract

This is a discussion on Interface and Absract within the Java forums, part of the Programming Talk category; Please tell me what's the different between an interface and absract? If possible kindly explain it with the help of ...

  1. #1
    Lucy is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    7

    Interface and Absract

    Please tell me what's the different between an interface and absract? If possible kindly explain it with the help of an example

    Thanks
    Lucy


  2. #2
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122
    An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract.
    An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.


Latest Article

Network Security Risk Assessment and Measurement

Read More...