31. Kotlin has two equality operators, == and ===. What is the difference?
32. Your code need to try casting an object. If the cast is not possible, you do not want an exception generated, instead you want null to be assigned. Which operator can safely cast a value?
33. Which is the correct declaration of an integer array with a size of 5?
34. Which command will return the length of a String in Kotlin?
35. Which view attribute do you use to set the width of a View so that it adjusts to fit the content?
36. You would like to group a list of students by last name and get the total number of groups. Which line of code accomplishes this, assuming you have a list of the Student data class? Data class Student(val firstName: String, val lastName: String)
37. Which method changes the image resource for an ImageView in Kotlin code?
38. Which of the following extension methods are used in Kotlin?
39. Which method on an Activity inflates the app's layout and makes its views available as objects?
40. Which is the correct way to reference bound data in the XML layout?
Read More Section(Kotlin Program)
Each Section contains maximum 100 MCQs question on Kotlin Program. To get more questions visit other sections.
