pure java coding practice