Core Java learning code