posted 17 years ago
Since myName is a static, it is related to the class not any instance of that class. Though you have a reference with null it has no effect on the static variable myName, so you are not getting any NullPointerException.
But if you remove the static modifier from the declaration of myName, you will definitely get an exception.