title: Java - Is it possible to keep printing text on the same line you enter a number on?
body: <p>I want to be able to enter a number using <em>nextInt()</em> and then print text on the same line as the number I entered. For example...</p>
  
  <pre><code>Scanner scan = new Scanner(System.in);
  System.out.print("Enter your number: ");
  int x = scan.nextInt(); //After you press 'enter' it goes to the next line and keeps printing text
  System.out.print("I want this on the same line as my number!");
  </code></pre>
  
  <p>And the output would look something like this:</p>
  
  <pre><code>Enter your number: 4356
  I want this on the same line as my number!
  </code></pre>
  
  <p>Is there a way I can get the text to print right after the number? So it would look something like this?...</p>
  
  <pre><code>Enter your number: 4356 I want this on the same line as my number!
  </code></pre>