Skip to content

bytebitt/Alarm-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alarm Clock (Java Console App)

A simple Java console-based alarm clock built while following a programming course.
The project demonstrates basic usage of threads, time handling, and audio playback in Java.


⏰ Features

  • User inputs alarm time in format HH:mm:ss
  • Live console clock display
  • Waits until the selected time
  • Plays a sound when the alarm triggers
  • Stop alarm manually by typing Q

🧠 How It Works

  1. User enters a target alarm time
  2. Program parses it using LocalTime
  3. A separate thread runs and checks current time every second
  4. When time matches:
    • WAV sound is played using Java Sound API
  5. User can stop playback by entering Q

🛠️ Tech Stack

  • Java SE
  • Multithreading (Runnable, Thread)
  • java.time API (LocalTime, DateTimeFormatter)
  • Java Sound API (AudioSystem, Clip)
  • Console input/output (Scanner)


▶️ How to Run

Compile

javac Main.java AlarmClock.java

Run

java Main

About

CLI Alarm Clock

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages