Added sample java program