Thursday, December 4, 2008

The Key Words: static & public & final

public: so they are usable outside the package;
static: to emphasize that there's only one
final : to say that it's a constant.

Note that final static primitives with constant initial values(that is, compile-time constants)

1 comment:

Anonymous said...

Not really... final actually means the instance cannot be changed, e.g. the field value cannot be changed or the method body cannot be overrided. static means the instance belongs to a class, but not to an object instance, thus this static concept is only valid for method and field, but not class.