aspose file tools*
The moose likes Beginning Java and the fly likes i want answer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "i want answer" Watch "i want answer" New topic

i want answer

medikonda swetha

Joined: Jul 22, 2008
Posts: 3
what the difference between interface and abstract
satish bodas
Ranch Hand

Joined: Jun 19, 2008
Posts: 116
One - This forum ( ORM ) is not the correct one to post this question

Two - demanding answers will get you nowhere

However to get trhe ball rolling and also to induce much more knowledgable people to correct me - will give it a shot .

The simplest of reasons is related to multiple inheritance
( and I am sure you are looking for more than this )

Another difference I can think of is if you have some default generic behaviour to implement - go for an abstract class - since interface will not allow implementations

One more - ( this is my understanding ) - if the system changes a lot I think its better to have an abstract class as supertype where - you can add a "new" method with some default implementation .

If this were to be an interface - it would be a maintenance nightmare to add a new method .

Thanks ,
[ July 28, 2008: Message edited by: satish bodas ]
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Please try to CarefullyChooseOneForum before posting. And please UseAMeaningfulSubjectLine. You could also probably benefit from learning to SearchFirst.

I'm going to move this to a more appropriate place.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 485
Read same question ask on javaranch.

Millions saw the apple fall, but Newton asked why.
If you understand, say "understand". If you don't understand, say "don't understand". But if you understand and say "don't understand". How do I understand that you understand? Understand!
I agree. Here's the link:
subject: i want answer