Last Updated: May 18, 2026
14 quizzes
Build a label where the two numeric values are added before text is attached.
String label = "Total: " + ;Click an option to fill the blank:
Use the current order ID for this order, then advance the stored ID for the next order.
int assignedOrderId = nextOrderId;Click an option to fill the blank:
A method declares a local variable for shipping cost, assigns it only inside an if branch, and then reads it after the branch. What happens at compile time?
An order total in cents is larger than the int range, and a developer wants to store it directly in a long variable using a decimal numeric literal. What must be true of the literal?
A user name is built at runtime in two separate String objects, both with the same characters. The program compares them with ==. What does that comparison test?
A shipping report divides total packages by vans, both stored as int, and assigns the result to a double. The decimal part is missing. What change addresses the cause?
A program reads a quantity with Scanner.nextInt() and then immediately reads a product name with Scanner.nextLine(). The name appears empty. What caused this?
Complete the code to represent a missing coupon code using a reference value
couponCode = ;System.out.println(couponCode);Click an option to fill blank 1:
Complete the formatted output for product name and price
String productName = "Mug";double price = 12.5;System.out.("Product: %s Price: %.2f%n", , price);Click an option to fill blank 1:
Complete the input reads for an integer quantity and a decimal unit price
java.util.Scanner scanner = new java.util.Scanner(System.in);int quantity = scanner.();double unitPrice = scanner.();Click an option to fill blank 1:
Match each numeric scenario to what Java does
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match each commenting situation to the most appropriate choice
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Order the steps for reading a numeric line of input and using it in a calculation
Drag and drop to reorder, or use the arrows.
Order what happens when creating an array, storing a value, and reading it through a reference
Drag and drop to reorder, or use the arrows.