Vidyalelo
Computer Science · Q138

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 138

Q138

What is the difference between a nullable and non-nullable variable in Kotlin?

A.
A nullable variable can be null or have a value
Answer
B.
A nullable variable can only have a value
C.
A nullable variable can be cast to any other type
D.
A nullable variable can only be accessed within a try-catch block

Answer: Option A

Solution

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