Skip to content

Instantly share code, notes, and snippets.

public void submitOrder(View view) {
displayMessage(calculatePrice(quantity));
}
@org.jetbrains.annotations.NotNull
private String calculatePrice(int quantity){
return priceMessage + "\n" + NumberFormat.getCurrencyInstance().format(quantity * pricePerCup);
}