Tell me how you would optimize a Java application’s memory usage.

Situational