title: Scanner input string without spaces?
body: <p>I was wondering how I can do this.</p>
  
  <p>I was told to use <code>kb.nextLine()</code> instead of <code>kb.next()</code> , but that just results in the input being skipped when I run the program. </p>
  
  <pre><code>String address;
  student.setAddress(address = kb.nextLine()); 
  </code></pre>
  
  <p>I was then told to do this to fix it:</p>
  
  <pre><code>student.SetAddress(String address = kb.nextLine());
  </code></pre>
  
  <p>but I get an error:
  <code>String cannot be resolved into a variable" "Syntax error on token "address"</code></p>