Vidyalelo
Computer Science · Q218

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 218

Q218

What is the correct way to create an object called myObj of MyClass?

A.
Main myObj = new MyClass();
B.
MyClass.new myObj
C.
val myObj = MyClass()
Answer
D.
None of these

Answer: Option C

Solution

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