title: Kotlin: What is the difference between Apply and Also
body: <p>What is the difference between apply and also. From what I know the following code does the same thing:</p>
  
  <p><strong>apply</strong></p>
  
  <pre><code>val person = Person().apply {
      name = "Tony Stark"
      age = 52
      // More such stuff
  }
  </code></pre>
  
  <p><strong>also</strong></p>
  
  <pre><code>val person = Person().also {
    it.name = "Tony Stark"
    it.age = 52
    // More such stuff
  }
  </code></pre>
  
  <p>Is there any difference and should I use one over the other? Also, are there some cases where one would work and the other won't?</p>