Skip to content

Instantly share code, notes, and snippets.

@erokhins
Created April 21, 2017 13:33
Show Gist options
  • Save erokhins/82d890edb44d22ac245699c6a2c4356e to your computer and use it in GitHub Desktop.
Save erokhins/82d890edb44d22ac245699c6a2c4356e to your computer and use it in GitHub Desktop.
// FILE: 1.kt
package p3
class A {
fun <T> test(a: List<T>): Int {
println("Function 1")
return 1
}
fun test(b: List<Int>) {
println("Function 2")
}
}
// FILE: B.java
package p3;
import java.util.ArrayList;
import java.util.List;
public class B {
public static void main(String[] args) {
A a = new A();
List<String> sList = new ArrayList<>();
a.test(sList);
List<Integer> iList = new ArrayList<>();
a.test(iList);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment