title: How to do i convert the piece of kotlin code in java?
body: <p><em>Hello Developers , I am trying to build a bottomsheet in android studio by the help of a YouTube video. But in the video the youtuber use kotlin and I don't know kotlin. I have already complete the layout part but I stucked in the code section.</em></p>
  <p><strong>For the video click here</strong>
  Or Use this link <a href="https://www.youtube.com/watch?v=3vMtHKniOqI&amp;t=250s&amp;ab_channel=DroidUI" rel="nofollow noreferrer">https://www.youtube.com/watch?v=3vMtHKniOqI&amp;t=250s&amp;ab_channel=DroidUI</a></p>
  <hr />
  <pre><code>bottomsheetbehavior.from(bottomsheet).apply{ 
  peekheight=200 
  this.state.bottomsheetbehavior.state_collapsed }
  </code></pre>