Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 958 Bytes

File metadata and controls

20 lines (13 loc) · 958 Bytes

Countdown Problem

CountDownProblem.java is the complete example used in the article https://inside.java/2023/11/03/countdown-haskell-java. The code represents the Java port of a Haskell example authored by Prof. Graham Hutton. The problem and the solution approaches of the Haskell example are explained in https://youtu.be/CiXDS3bBBUo?list=PLF1Z-APd9zK7usPMx3LGMZEHrECUGodd3.

Prerequisites

You need JDK 21+ installed on your machine to run this sample. Find out how to achieve that by going through the setting up a JDK section of https://dev.java/.

Run the progam

Make sure you are inside the countdown-haskell-java directory and then run the following command in a terminal:

  java CountDownProblem.java 1,3,7,10,25,50 765

You may try different arguments to check for different results.