mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
16 lines
306 B
Kotlin
Vendored
16 lines
306 B
Kotlin
Vendored
// FILE: Foo.java
|
|
|
|
import java.util.*;
|
|
|
|
public class Foo {
|
|
public static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll) {
|
|
return Collections.max(coll);
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
fun box(): String {
|
|
return Foo.max(java.util.Arrays.asList("AK", "OK", "EK"))!!
|
|
}
|