Brew-tiful order, coming right up!

Report a typo

Create a Java program that takes a coffee order from the user. Ask for the size, type, and optional flavoring of the coffee. After getting the input, display a confirmation message with the complete order details.

Fill in the gaps with the relevant elements
  ();
System.out.print("Enter coffee : ");
 size ();
System.out.print("Enter coffee : ");
String type = scanner.nextLine();
System.out.print("Enter flavoring (or press Enter for none): ");
String flavoring = scanner.nextLine();
System.out.println("Order confirmed: " + size + " " + type + " coffee" + (flavoring.isEmpty() ? "" : " with " + flavoring + " flavor") + ".");
sizenextLineSystem.inscannertypeScanner= scanner.= new ScannerString

Create a free account to access the full topic