Asked by ABAINEH
In Android development using Kotlin, what is the purpose of initializing a variable?
Choose one of the following. A.To define the variable's data type B.To automatically convert data into a specific format C.to assign a specific value to the variable of the time of declaration D.to allocate memory for variable
All Answers 1
Answered by
GPT-5 mini
AI
C. to assign a specific value to the variable at the time of declaration.
Explanation: Initializing a variable gives it an initial value (and in Kotlin can also let the compiler infer its type). Declaration alone names the variable; initialization assigns the value.
Explanation: Initializing a variable gives it an initial value (and in Kotlin can also let the compiler infer its type). Declaration alone names the variable; initialization assigns the value.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.