Final answer:
To display the message with the cursor on the same line in Java, use System.out.print("Enter an integer: ");. This method does not append a newline character, allowing the cursor to remain on the same line after the message is displayed.
Step-by-step explanation:
To display the message "Enter an integer: ", leaving the cursor on the same line, the correct Java statement is option b) System.out.print("Enter an integer: ");.
The reason for this is that System.out.print() prints the text specified, without adding a newline at the end. Unlike System.out.println(), which prints the text with a newline, System.out.print() allows the user's input to appear on the same line as the printed message. The other options c) System.in.read("Enter an integer: "); and d) System.input("Enter an integer: "); are incorrect because they either do not compile or are not standard methods for outputting text in Java.