[2491] in java-interest

home help back first fref pref prev next nref lref last post

Re: Static class VS final class

daemon@ATHENA.MIT.EDU (Ben Black)
Tue Oct 3 13:03:40 1995

From: Ben Black <benb@velocity.com>
Date: Tue,  3 Oct 95 09:20:22 -0500
To: java-interest@java.sun.com
Reply-To: black@velocity.com

>  Can someone explain the different between a static class and a final class
>for me?  Both of them cannot be subclassed and instantiated.
>
anyone who knows better, please feel free to correct me.  in objective-c  
(and, i would assume, java) a static class can only be instantiated once.   
static variables within a class (again, in objective-c) are class variables  
(shared by every instance of the class) and are not inherited.  a final class  
is one which has been frozen.  there is really no difference between a final  
class and any other class, other than the fact that subclassing it is not  
allowed.

(waiting for someone smart to enumerate my mistakes in the above paragraph)

ben
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post