added code snippet for first java program