We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9384d06 commit c70d7aaCopy full SHA for c70d7aa
src/MyJavaFile.java
@@ -0,0 +1,17 @@
1
+
2
3
+/*
4
+ * Interoperability Example
5
+ * */
6
+public class MyJavaFile {
7
8
+ public static void main(String[] args) {
9
10
+ int sum = MyKotlinInteroperabilityKt.addNumbers(3, 4);
11
+ System.out.println("Printing sum from Java file :" + sum);
12
+ }
13
14
+ public static int getArea(int l, int b) {
15
+ return l * b;
16
17
+}
src/myKotlinInteroperability.kt
@@ -0,0 +1,14 @@
+fun main(args: Array<String>) {
+ var area = MyJavaFile.getArea(10, 5)
+ println("Printing area from Kotlin file: $area")
+fun addNumbers(a: Int, b: Int): Int {
+ return a + b
0 commit comments