07-20-2023, 03:49 PM
There is no static keyword in kotlin. kotlin docs recommends to use package-level functions if u want to follow DRY.
Create a file with **.kt** extension and put your method in it.
package p
fun m(){
//fun body
}
after compilation **m** will have a signature of **public static final void**
and
import p.m
☺
Create a file with **.kt** extension and put your method in it.
package p
fun m(){
//fun body
}
after compilation **m** will have a signature of **public static final void**
and
import p.m
☺