Final answer:
To display 'digit' if the char variable ch is a numeric digit, use Character.isDigit(ch) in the if statement. If ch is not a digit, 'not a digit' will be displayed.
Step-by-step explanation:
To complete the if statement to display the word "digit" if the char variable ch contains a numeric digit, you would need to check if ch is between '0' and '9'. You can write a boolean expression that uses Character.isDigit(ch) method, which returns true if the specified character is a digit. Alternatively, you can use a range check like (ch >= '0' && ch <= '9'). Here's the complete if statement using the Character.isDigit method:
if (Character.isDigit(ch))
System.out.println("digit");
else
System.out.println("not a digit");
Both ways will achieve the intended result, but using Character.isDigit makes the code easier to read and understand.