6May/090
Java: Static Variables, Static Methods and Static Constructor
Java's static variables are variables or fields that are common to all object of a class. Unlike instance variables, objects of the same class have their own distinct copies of the variables and values. In other words, a static variable is shared among objects of the same class. You can declare static variables (or static fields or class variables) by adding static modifier to the variables declaration.
20Mar/090
Java Static Constructor
Recently I wrote a Java class that maps ISO 3166-1-alpha-2 country code to country name and encountered a static constructor initialization problem. My code is as following:
