title: Difference between OnclickListener methods in Kotlin
body: <p>I am learning Kotlin. Before that, I have worked with Java for Android Development. Kotlin is a great language to learn. I have a confusion while I was using <code>setOnClickListener(View.OnClickListener)</code>. I have seen two hints on Android Studio.</p>
  
  <p><a href="https://i.stack.imgur.com/mTRiq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mTRiq.png" alt="image"></a></p>
  
  <p>I know how to work or define both of them.</p>
  
  <p>The first way to implementing <code>OnClickListerner</code></p>
  
  <pre><code> send_button.setOnClickListener(object : View.OnClickListener{
         override fun onClick(p0: View?) {
             TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
         }
     })
  </code></pre>
  
  <p>and this is the second way of implementing <code>OnClickListener</code></p>
  
  <pre><code> send_button.setOnClickListener {
          TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
      }
  </code></pre>
  
  <p>I understand as far as the second method is based on lambda. But I can't have the proper understanding of these methods.</p>
  
  <p>So, my question is: What is the difference between those methods? If they differ, which one is better and why?</p>