Re: Static classes
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 May 2005 17:24:17 +0100
Altman wrote:
> I am making a class called utilities which I plan to have a couple of
> static methods in it. I have declared the class as follows.
> public class Utilities {
> public static Settings userData = new Settings();
> // static methods go here
> }
>
> My question is: do I have to create an instance of the Utilities
> class in order for my userData object to be available?
No.
(But I wouldn't expose a non-final field like that, myself.)
-- chris
.
- References:
- Static classes
- From: Altman
- Static classes
- Prev by Date: Re: Problem with streamed ZIP file and Windows XP
- Next by Date: Re: Standard Dicom images in java
- Previous by thread: Static classes
- Next by thread: Re: Static classes
- Index(es):
Relevant Pages
|