Cinfy Systems Interview Question

How to optimize a java program?