a program study in java