The most difficult aspect of the synchronized keyword is deciding when to use it. You pay a performance penalty for using synchronized methods. The Java 2 platform brings some new internal algorithms to the JVM to improve performance of multithreaded programs.