Results 1 to 4 of 4

Thread: Interface

  1. #1
    sabarii is offline Member
    Join Date
    Sep 2011
    Location
    Pondicherry
    Posts
    7
    Rep Power
    0

    Thumbs up Interface

    Hi every one,
    Is Same Interface can implemented by many class?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,436
    Blog Entries
    7
    Rep Power
    20

    Default Re: Interface

    Quote Originally Posted by sabarii View Post
    Hi every one,
    Is Same Interface can implemented by many class?
    Did you try it? What did your compiler say?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    sabarii is offline Member
    Join Date
    Sep 2011
    Location
    Pondicherry
    Posts
    7
    Rep Power
    0

    Default Re: Interface

    thankz for reply..
    yes i tried with implementing interface with two class , no error. When i call the interface method, it invoke ony one method in the implemented class. But i implemented the interface in two class with different s.o.p.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Interface

    Quote Originally Posted by sabarii View Post
    thankz for reply..
    yes i tried with implementing interface with two class , no error. When i call the interface method, it invoke ony one method in the implemented class. But i implemented the interface in two class with different s.o.p.
    How does this surprise you? The interface is only a contract that states that the class that implements it must have so-and-so methods. The method invoked will only be the one for the current object as is always the case.

Similar Threads

  1. Interface
    By qadeer37 in forum New To Java
    Replies: 6
    Last Post: 02-02-2010, 12:15 PM
  2. Interface?
    By makpandian in forum New To Java
    Replies: 5
    Last Post: 03-26-2009, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •