Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference b/w interface and class

 
yasirbadshah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between interface and class?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Interface: contract to implement a specified API.
Class: Any java object.
We can extend only one class, but we can implement many interfaces.
You had better start reading any java book as this is essential to Java!
NOTE: Your name doesn't fit with the Ranch naming policy. Please read it here and re-register with a valid name.
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic