Cinfy Systems interview question

How to optimize a java program?