An interface is exactly just that (plus constant declerations).  With
abstract classes, you can have static methods and everything else that
comes with a proper class.  The drawback is, of course, that you can
only inherit from at most one abstract class.

I cannot think of even a single example, off the top of my head, where
an abstract class in Android could have also been defined as an
interface without losing any functionality.



On Jul 25, 12:05 pm, Indicator Veritatis <[email protected]> wrote:
> Those "many cases for this there is no particularly good reason one
> was picked over the other" are most likely, I hope, the cases where I
> gave up on trying to figure out why the Android team chose to make the
> one 'abstract class' and the other 'public interface';)
>
> On Jul 21, 10:28 pm, Dianne Hackborn <[email protected]> wrote:
>
>
>
> > On Thu, Jul 21, 2011 at 8:16 PM, Indicator Veritatis 
> > <[email protected]>wrote:
>
> > > They do not pause to explain, for example ... why some classes are defined
> > > a public abstract classes, while very similar other classes are
> > > defined as interfaces.
>
> > Well hopefully you generally don't care.  And to be honest, in many cases
> > for this there is no particularly good reason one was picked over the other.
> > ;)
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to