71 questions
e: C:\Users\yhw\AndroidStudioProjects\MyApplication3\app\src\main\java\com\example\myapplication\ResultActivity.kt: (13, 61): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable ...
Hello, teachers. I'm asking you a question because there's something difficult about Cotlin.What I want to do is enter a value in one activity and click the buttonIt is added to the list view of other...
to study inheritance at Cotlin I'm asking you this question because there is a confusing part of the child instance property approach in the parent instanceopen class Animal(val size:Int)class Spider(...
Hello, I'm a beginner who just started studying programming.I'm currently studying Cotlin with the goal of developing an app. (I'm studying with Kang's Kotlin programming book.)As I studied, I think r...
fun <T> test(block: (T) -> Unit) {}fun <T> test(block: T.() -> Unit) {}I'm studying libraries like apply() and also() in Cotlin But I don't understand T.() here.The first one makes s...
fun getTitle(): String = titleData.joinToString( / )title = bpCV?.Error if getTitle().toString() // 1 toString is missingbpCV?.apply { title = getTitle() } // 2title = run { bpCV?.getTitle()} // 3 err...
inline fun <T, R> T.run(block: T.() -> R): R { return this.block()}The book says that the run extension function is defined in this way.The explanation of this is as followsThe block paramete...
I'm studying coroutine, but I have a question because I don't understand it well.Does the 1.suspend function stop the coroutine at the called place?suspend fun exampleSuspend() { val job1 = Coroutine...
I'm making an application about getting Android location informationI'm trying to put in the background location information, and from the latest version of Android 11 and above,Unless the user allowe...
I get this error when I run the app, but I don't know what the problem is.E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sharing, PID: 16912 java.lang.ArrayIndexOutOfBoundsException: len...
« | - 7 - | » |
© 2024 OneMinuteCode. All rights reserved.