title: How to convert a var to Int in Scala?
body: <p>Is there a method to convert a <code>var</code> to <code>Int</code> in Scala?</p>
  
  <p>Suppose I have:</p>
  
  <pre><code>var noOfConcurrentUsers =  sys.env.get("NumberOfConcurrentUsers");
  
  // I need the following
  var userNo = noOfConcurrentUsers //some method
  </code></pre>
  
  <p>I am getting the variable as an environment variable in <code>String</code> format from <code>Jenkins</code>.</p>
  
  <p>Getting error:</p>
  
  <pre><code> Cannot resolve symbol toInt
  </code></pre>