your loop in your main method has initialization of countdown = 5
and a condition of countdown must be less than or equal 1
therefore that loop will never be executed.
Once you fix that bug regarding with the condition, take a look on your decrement. You might have a problem with the decrement countdown = countdown--
, if you just want to decrease the current value of your countdown by 1, this statement (decrement) will do best: countdown--
. The problem will occur since you used post decrement/increment
Post decrement/increment will execute the statement first before the increment/decrement.
Pre Inrement will execute first the increment/decrement before the main statement