Practice Code for Core java related class