• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface

 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does someone can Explain to me what is interface?
Thanks
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure thing.
an interface is like an abstract class.
as u may know, an abstract class is a class that SOME of its methods are abstract and some maybe not.
an interface is like an abstract class which ALL methods are abstract by default.
interfaces do not provide implentation of methods, they only define behaviours - ie signatures of methods.
class can implement an interface (unlike a class which they extend) and they can do it with with multiple interfaces (they can implement many) as opose to only 1 in extends.
for better refrence to interfaces u can check the sun tutoriol on it in http://java.sun.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic