src/share/classes/java/util/concurrent/ScheduledExecutorService.java
Print this page
@@ -70,28 +70,27 @@
* <h3>Usage Example</h3>
*
* Here is a class with a method that sets up a ScheduledExecutorService
* to beep every ten seconds for an hour:
*
- * <pre>
+ * <pre> {@code
* import static java.util.concurrent.TimeUnit.*;
* class BeeperControl {
* private final ScheduledExecutorService scheduler =
* Executors.newScheduledThreadPool(1);
*
* public void beepForAnHour() {
* final Runnable beeper = new Runnable() {
* public void run() { System.out.println("beep"); }
* };
- * final ScheduledFuture<?> beeperHandle =
+ * final ScheduledFuture<?> beeperHandle =
* scheduler.scheduleAtFixedRate(beeper, 10, 10, SECONDS);
* scheduler.schedule(new Runnable() {
* public void run() { beeperHandle.cancel(true); }
* }, 60 * 60, SECONDS);
* }
- * }
- * </pre>
+ * }}</pre>
*
* @since 1.5
* @author Doug Lea
*/
public interface ScheduledExecutorService extends ExecutorService {