java program about shares