THINK FIRST·CODE LATER

← All labs

Fix the compile errors

Problem

The program below should print four lines, but it does not compile. Find and fix every error (there are five), then run it.

public class fixMe {
    public static void main(String[] args) {
        System.out.println("Hours in a week: " + 7 * 24)
        System.out.println("Minutes in a day: " + 24 * 60);
        system.out.println("Seconds in an hour: " + 60 * 60);
        System.out.println("Done!);
    }

Expected output:

Hours in a week: 168
Minutes in a day: 1440
Seconds in an hour: 3600
Done!

(The class must be named FixMe and saved in FixMe.java.)

Write it here or in your IDE, then paste it. Compile and test it yourself before comparing. Your code stays in your browser — it is never sent to or stored on the server.