Bookmark Topic Watch Topic
  • New Topic

why we use interface instead of abstract class  RSS feed

 
Sanju
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Report post to moderator
HI,
Abstract class and interfaces both we have to declare methods. at what situation we can use abstract class and interfaces. both should have to use declared methods. but why mostof the time we prefer interfaces? why not abtstract class.

plz explain any body,
Sanju.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
For one thing, a class can extend only one abstract class but it can implement any number of interfaces.
Bill
[ January 05, 2005: Message edited by: William Brogden ]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
closing this duplicate thread. Please don't post the same question in multiple forums. You can find the original thread here.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!