Results 1 to 6 of 6
  1. #1
    tariqm is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Interface In Java

    Hi All,
    Can someone explain the Interfaces in java Please?
    I am looking for a working example to understand an Interface.

    Thanks in Advance.

    Tariq

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

  3. #3
    tariqm is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: Interface In Java

    Thanks for that doWhile;
    I have already checked the java docs, still confused especially
    about the implementation.
    Hope that you or someone else will be kind enough to explain it to me.

    Regards,
    Tariq

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Interface In Java

    What is confusing about it? It truly helps to know - after reading the above link - what you are confused about, at least as close as you can come to describing the confusion, otherwise we can post links ad-nauseam and end up going nowhere (and BTW, there are other links in that page that lead to more informative pages worth your time reading)

  5. #5
    tariqm is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: Interface In Java

    Quote Originally Posted by doWhile View Post
    What is confusing about it? It truly helps to know - after reading the above link - what you are confused about, at least as close as you can come to describing the confusion, otherwise we can post links ad-nauseam and end up going nowhere (and BTW, there are other links in that page that lead to more informative pages worth your time reading)
    I just checked those links, some of the concepts are too advance for me.
    The thing i am confused about is first of all why we use Interfaces at the first place?
    My understanding so far is that Interface is also a prototype like a Class but with many differences.
    Interface can only have method bodies and class which implements the interface will have the implementation of these methods.

    Still doing some research.......................................

    Am i on the right track?

    Tariq

  6. #6
    Wnt2bsleepin is offline Senior Member
    Join Date
    Feb 2012
    Posts
    219
    Rep Power
    3

    Default Re: Interface In Java

    I posted a thread a while ago about this. Got some good responses. To add to what they said, I believe it also enforces the methods on the class.

Similar Threads

  1. Interface in Java
    By JAVA03 in forum New To Java
    Replies: 2
    Last Post: 03-03-2011, 08:22 AM
  2. Java app without interface
    By fawzan in forum Advanced Java
    Replies: 9
    Last Post: 12-29-2010, 05:07 PM
  3. Replies: 1
    Last Post: 05-31-2009, 11:57 PM
  4. Replies: 1
    Last Post: 05-31-2009, 03:17 PM
  5. Replies: 16
    Last Post: 05-28-2009, 04:41 PM

Posting Permissions

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