Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes abtract class and interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
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: 80
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: 61458
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10491
    
    9

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


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

Joined: Mar 15, 2012
Posts: 80
thanks for help
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: abtract class and interface