Kotlin Program - Study Mode

[#171] If a class has one or more secondary constructors, what must each of them do?
Correct Answer

(C) Each secondary constructor must directly or indirectly delegate to the primary

[#172] Which of the following targets are currently not supported by Kotlin?
Correct Answer

(B) .NET CLR

[#173] Which of the following constructors are available in Kotlin?
Correct Answer

(C) Both A & B

[#174] You have created an array to hold three strings. When you run the code below, the compiler displays an error. Why does the code fail? val names = arrayOf(3) names[3]= "Delta"
Correct Answer

(A) Arrays use zero-based indexes. The value 3 is outside of the array's bounds

[#175] Which keyword is used to define an immutable variable?
Correct Answer

(B) val