How to keep my user input on the same line after an output?
java, new-operator
Solution
Use `print()` instead of `println()`;
`System.out.println()` automatically adds a newline character. That what the `ln` means.
Problem
I'm trying to write code that asks for the users age and then they enter it, but I want the number to appear next to the question after you enter it. My code looks like this: ``` System.out.println("Enter a number: "); num1 = userIn.nextInt(); ``` It works fine, but the number always appears on the line below. Output: ``` Enter a number: 12 ``` What I want: ``` Enter a number: 12 ``` Any suggestions?