title: How to escape semicolon in Java Scanner
body: <p>I'm trying to take an input using <code>Scanner</code> class in Java.</p>
  
  <p>My code is:</p>
  
  <pre><code>Scanner scan = new Scanner( System.in);
  String newline = scan.next();
  </code></pre>
  
  <p>My input is something like: </p>
  
  <pre><code>india gate;25;3
  </code></pre>
  
  <p>and I'm trying to replace the whole string above with a new string:</p>
  
  <pre><code>new delhi;23;2
  </code></pre>
  
  <p>using</p>
  
  <pre><code> .replace(str1, str2)
  </code></pre>
  
  <p>The problem is it's only replacing the first word in the string and the output is something like:</p>
  
  <pre><code>india delhi;25;3
  </code></pre>
  
  <p>How can I take it as a whole string using <code>Scanner</code>?</p>