title: Scala : reassignment to val
body: <p>I am looking for a way to resolve the below compilation error in Scala. I am trying to update the value of a variable <code>clinSig</code>, if the <code>clinSig</code> is null while calling <code>method1</code>.</p>
  <pre><code>import org.joda.time.Instant 
  import java.util.Calendar
  
  class TestingClass {   
      method1(null)   
      private def method1 (clinSig : Instant) {
      if (clinSig == null) {
        val calendar = Calendar.getInstance()
        calendar.set(2011, 0, 5, 0, 0, 0)
        calendar.set(Calendar.MILLISECOND, 0)
        clinSig = new Instant(calendar.getTime)
      }
      print(clinSig)   
     } 
  }
  </code></pre>
  <hr />
  <pre><code>error: reassignment to val
   [INFO]       clinSigUpdtDtTm = new Instant(calendar.getTime)
  </code></pre>