add pirnt java snippet