Skip to content

Deep in Code

Take a deep dive into code

Author Archives: Deepak Anupalli

Bootstrapping static fields within enums

In my earlier post on enums in Java 5, we have seen that static fields cannot be accessed within the enum constructor. With this restriction we could run into few initialization problems discussed below. The other day Rajiv found it difficult to initialize a static cache during enum bootstrap. The following is his enum: public […]

Posted byDeepak AnupalliDec 8, 2006May 17, 2020Posted inJava57 Comments on Bootstrapping static fields within enums

Type Safe Enumerations in Java 5.0

The new enum construct in Java 5.0 is used to define enumerations. Enumerations are not new to programming languages, they existed in C, C++, SmallTalk etc. In Java 5.0 they had to be introduced to overcome safety and ease of use concerns in using the earlier enumeration approaches. Let us take a look at how […]

Posted byDeepak AnupalliNov 21, 2006Aug 8, 2012Posted inJava517 Comments on Type Safe Enumerations in Java 5.0

Posts navigation

Newer posts 1 2 3

RSS RSS Feed

  • Amazon SimpleDB Developer Guide by PACKT
  • Playing around with exception stack traces
  • Improper use of Generics could breach type safety
  • Understanding Generics with Collections
  • Bootstrapping static fields within enums
  • Type Safe Enumerations in Java 5.0

Archives

  • July 2010
  • August 2007
  • March 2007
  • December 2006
  • November 2006

Categories

  • Cloud
  • Java
  • Java5
Deep in Code, Proudly powered by WordPress.