commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Static versus Transient Logger Declarations
Date Sat, 11 Sep 2010 05:46:23 GMT
Take Math.sin as an example.  Should you have to instantiate a Math object
just to compute the sine?

On Fri, Sep 10, 2010 at 8:18 PM, Guy Rouillier <guyr-ml1@burntmail.com>wrote:

> On 9/10/2010 9:15 AM, Martin Gainty wrote:
>
>>
>> Ray and crew
>>
>> other than accomodating a main driver such as public static void
>> main(String args[])  is there any reason for declaring any method or
>> variable as static?
>>
>
> Sure.  If you have methods that are self-contained, i.e., use only
> parameters or local variables, then there is little reason *not* to make
> them static.  Why incur the object overhead?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message