Vidyalelo
Computer Science · Q103

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 103

Q103

Can an inner class have its own properties and methods?

A.
No, it can only access the outer class's properties and methods
B.
No, it can only access the outer class's properties and methods and cannot have its own
C.
Yes, but it can only access the outer class's properties and methods, not have its own
D.
Yes, it can have its own properties and methods just like any other class
Answer

Answer: Option D

Solution

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