A simple stopwatch program in Java that allows the user to start, pause, resume, and stop a stopwatch.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have the following software installed on your system:
- Java (1.8 or later)
Clone : git clone https://github.com/OpenGenus/stopwatch-in-java.git
or download the repository (zip file) to your local machine.
Compile the java code using the following command:
javac stopwatch.java
Run the code using the following command:
java stopwatch
- Start the stopwatch by pressing S when prompted.
- Pause the stopwatch by pressing P.
- Resume the stopwatch by pressing R.
- Stop the stopwatch by pressing Enter.
- Quit the program by pressing Q when prompted.
For a more detailed explanation, see the link.