ument-exception/index.html">IllegalArgumentException</a> if the <a href="create.html">collection</a> is <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-collection/is-empty.html">empty</a>.</p><br>
<details>
<summary>
    <b>Calling from Kotlin</b>
</summary><p class="paragraph">Here's an example of calling this method from Kotlin code:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">val collection: Collection&lt;Int&gt; = listOf(1, 2, 3)<br>val is