Core java code