Forums Java Help What is interface and its use?

This topic contains 1 reply, has 1 voice, and was last updated by  Aakanksha 8 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7365

    Aakanksha
    Participant

    What is interface and its use?

    #11942

    Aakanksha
    Participant

    Interface is similar to a class which may contain method’s signature only but not bodies and it is a formal set of method and constant declarations that must be defined by the class that implements it. Interfaces are useful for: a)Declaring methods that one or more classes are expected to implement b)Capturing similarities between unrelated classes without forcing a class relationship. c)Determining an object’s programming interface without revealing the actual body of the class.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.