How to declare a variable in kotlin?
Answer / Dev Mani Rawat
{"declaration": "A variable is declared using the keyword 'var' or 'val', followed by its name, and then its type. The value can be assigned after the declaration on the same line, or separately on subsequent lines."}
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the modifiers that are available in kotlin?
Does Kotlin support primitive Datatypes?
Does Kotlin support both Explicit conversion and Implicit conversions?
What are the advantages and disadvantages of Kotlin?
What is the use of rangeTo() function?
How does string interpolation work in Kotlin? Explain with a code snippet?
What is the default visibility modifier and also list the different types of modifiers?
In kotlin, can we create an empty array?
What is the difference between var and val ?
What is the use of any() function?
Does Kotlin allow macros?
What is the use of function extension ?