Hi everyone,
How do I create a timer in Java?
It's for a quiz I'm making and I want a time limit for each question.

There is a java class named Timer. Check that out.

Member Avatar

By the way, you're probably looking for a javax.swing Timer, not a java.util Timer. You should also look at the ActionListener class.