Re: isa
Re: isa
- Subject: Re: isa
- From: Andy <email@hidden>
- Date: Mon, 03 Jun 2002 01:17:35 -0400
Jeff LaMarche wrote:
>
Although subclassing from Object in Java is not as
>
commonly done as subclassing from NSObject in Cocoa, it is still good form,
>
and my experience is that when you take an Object as an argument, it will
>
even accept Java objects that were not subclassed from Object (although it
>
doesn't seem like it should).
Java has a singly rooted hierarchy - all objects in Java extend Object,
its just that the compilers are reuiried to allow a shorthand:
class foo {}
for
class foo extends java.lang.Object {}
Its impossible to declare a class in Java that isn't an Object.
I believe this is also true in C#, but certainly not in C++ or Objective-C.
--
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside
I think we finally found the killer app for Flash: animated stick men
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: isa (From: Jeff LaMarche <email@hidden>) |