Skip to content

Instantly share code, notes, and snippets.


jasongorman/ Secret

Created Dec 30, 2020
What would you like to do?
public class Program {
private static StockMonitor monitor = new StockMonitor(product -> {
// We are faking this for now
"You need to reorder product " + product.getId() +
". Only " + product.getStock() + " remaining in stock");
public static void main(String[] args) {
int productId = Integer.parseInt(args[0]);
int quantity = Integer.parseInt(args[1]);
monitor.productSold(productId, quantity);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.