Vidyalelo
Computer Science · Q204

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 204

Q204

Your function is passed by a parameter obj of type Any. Which code snippet shows a way to retrieve the original type of obj, including package information?

A.
obj.classInfo()
B.
obj.typeInfo()
C.
obj::class.simpleName
D.
obj::class
Answer

Answer: Option D

Solution

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