some practice codes in java