JLS
15.28 Constant Expression
ConstantExpression:
Expression
A compile-time constant expression is an expression denoting a value of
primitive type or a
String that is composed using only the following:
� Literals of primitive type and literals of type String
Since the member variable i in class Amit is a compile time constant it is resolved at compile time.