Vidyalelo
Computer Science · Q106

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 106

Q106

How can you initialize variables in a primary constructor in Kotlin?

A.
by using the var keyword
B.
by using the val keyword
Answer
C.
by using the constructor keyword
D.
by using the init keyword

Answer: Option B

Solution

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