This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes abtract class and interface Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "abtract class and interface" Watch "abtract class and interface" New topic
Author

abtract class and interface

Eshwin Sukhdeve
Ranch Hand

Joined: Mar 15, 2012
Posts: 78
hi,
suppose I have one abstract class.it contains all methods as abstract.and I have one interface..by defualt interface having all
methods abstract.in this case both having same behaviour.then why we chosse either interface or abstract class.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56529
    
  14

Please SearchFirst. This exact question has been posed many times.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8566

And we even have a FAQ for it http://www.coderanch.com/how-to/java/InterfaceVsAbstractClass
This would be more suitable on the beginners forum. Moving


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
Eshwin Sukhdeve
Ranch Hand

Joined: Mar 15, 2012
Posts: 78
thanks for help
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: abtract class and interface
 
Similar Threads
diff between abstract class and inheritance
Interface & Abstract class
Abstract & Interface
interface extending a an abstract class
when to use abstract ?