1. I've started a massive SPAM purge, any accounts that have spammed are being removed, also for a short period new user signups are disallowed until the SPAM cleaning is finished.

What is the difference between an Interface and an Abstract class ?

Discussion in 'Computer & IT Forum' started by d'souza, Jan 31, 2015.

  1. d'souza

    d'souza New Member

    Joined:
    Jan 31, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Java gives and backings the creation both of dynamic classes and interfaces. Both executions impart some regular attributes, however they vary in the accompanying gimmicks:

    All systems in an interface are verifiably dynamic. Then again, a conceptual class may contain both unique and non-theoretical systems.

    A class may execute various Interfaces, however can amplify one and only conceptual class.

    In place for a class to actualize an interface, it must execute all its announced systems. On the other hand, a class may not actualize all proclaimed strategies for a dynamic class. However, for this situation, the sub-class should likewise be proclaimed as unique.

    Conceptual classes can actualize interfaces without actually giving the execution of interface strategies.

    Variables pronounced in a Java interface is naturally last. A conceptual class may contain non-last variables.

    Parts of a Java interface are open as a matter of course. A part of a conceptual class can either be private, secured or open.

    An interface is totally conceptual and can't be instantiated. A conceptual class additionally can't be instantiated, yet can be conjured in the event that it contains a primary technique.

    appdynamics vs new relic
    Loading...
  2. sanamgupta

    sanamgupta New Member

    Joined:
    Nov 7, 2014
    Messages:
    22
    Likes Received:
    1
    Trophy Points:
    3
    Gender:
    Female
    1.Main difference is methods of a Java interface are implicitly abstract and cannot have implementations. A Java abstract class can have instance methods that implements a default behavior.

    2.Variables declared in a Java interface is by default final. An abstract class may contain non-final variables.
  3. Olin Lamanna

    Olin Lamanna Member

    Joined:
    Dec 19, 2013
    Messages:
    385
    Likes Received:
    18
    Trophy Points:
    18
    Gender:
    Male
    Abstract ideas gives a generalized ideas concerning java.
  4. andysmith

    andysmith Member

    Joined:
    Jun 30, 2014
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Gender:
    Male
    Principle distinction is strategies for a Java interface are verifiably unique and can't have usage. A Java unique class can have occurrence strategies that actualizes a default conduct. Variables pronounced in a Java interface is of course last. A theoretical class may contain non-last variables.

    electronic signature Microsoft
  5. rajdeep

    rajdeep Member

    Joined:
    Aug 10, 2014
    Messages:
    366
    Likes Received:
    0
    Trophy Points:
    16
    Gender:
    Male
    Most important variation is systems of a Java interface are implicitly abstract and cannot have implementations.
  6. AvancedSolutions

    AvancedSolutions Member

    Joined:
    Sep 3, 2014
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Gender:
    Male
    Location:
    Miami, FL
    Both are contract that is used to define hierarchies for all sub-classes. It defines specific set of methods and their arguments. The main difference between them is that a class can implement more than one interface but can only inherit from one abstract class. Since C# doesn't support multiple inheritance, interfaces are used to implement multiple inheritance.

Share This Page