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.

Uh, how do I check it out?

Member Avatar for coil

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.