title: How to Check whether input variable is Int in Scala?
body: <p>Hi I am reading through input variables from "args" and I want to check whether the input is integer value. I followed <a href="http://docs.scala-lang.org/tutorials/tour/pattern-matching.html" rel="noreferrer">this link</a> </p>
  
  <pre><code>    var param=0
      ...
      args(j) match {
                      ...
                      case args(j): Int =&gt; param =args(j)
                      ...
              }
  </code></pre>
  
  <p>but it gives me an error:</p>
  
  <pre><code>[error] '=&gt;' expected but ':' found.
  [error]            case args(j): Int =&gt; param =args(j)
  </code></pre>
  
  <p>Can't figure out what is the problem!</p>