Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HDFS >> mail # user >> Static class vs Normal Class when to use


Copy link to this message
-
Re: Static class vs Normal Class when to use
Take a look at Effective Java 2nd edition:

Item 22: Favor static member classes over nonstatic

On Wed, Mar 27, 2013 at 9:05 PM, Ted Yu <[EMAIL PROTECTED]> wrote:

> See
> http://stackoverflow.com/questions/1353309/java-static-vs-non-static-inner-class
>
> I believe Josh Bloch covers this in his famous book.
>
>
> On Wed, Mar 27, 2013 at 9:01 PM, Sai Sai <[EMAIL PROTECTED]> wrote:
>
>> In some examples/articles sometimes they use:
>> public static class MyMapper
>>
>> and sometimes they use
>>
>> public class MyMapper
>>
>> When/why should we use static vs normal class.
>>
>> Thanks
>> Sai
>>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB