Vidyalelo
Computer Science · Q97

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 97

Q97

What is the difference between a "var" and a "val" in Kotlin?

A.
var is a mutable variable, while "val" is an immutable variable
Answer
B.
var is a constant, while "val" is a variable
C.
val is a mutable variable, while "var" is an immutable variable
D.
val is a constant, while "var" is a variable

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board