Is it possible to use a Java API in Kotlin. For example I want to use a Barcode Scanner API, which ist written in Java, in my Kotlin code. So how can I use the constructor? In Java it is new BarcodeScanner()
how can I do this in Kotlin
几乎相同,只是没有new
关键字。
val scanner = BarcodeScanner()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.