Kotlin - Variables and Type System
Which of the following is a correct explicit type declaration for a mutable variable holding a decimal number in Kotlin?
var, so options with val are immutable.Double is correct. var price: Double = 9.99 uses var price: Double = 9.99, which is valid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions