Q241
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
292
Questions
13/15
Page
Pick an option on a question to see the right answer and solution.
Q241
Open questionSelect an option to see the answer and solution.
Q242
Open questionSelect an option to see the answer and solution.
Q243
Open questionSelect an option to see the answer and solution.
Q244
Open questionSelect an option to see the answer and solution.
Q245
Open questionSelect an option to see the answer and solution.
Q246
Open questionSelect an option to see the answer and solution.
Q247
Open questionfoo()()Select an option to see the answer and solution.
Q248
Open questionval set = setOf("apple", "pear", "orange", "apple")
println(set.count())Select an option to see the answer and solution.
Q249
Open questiondata class Project(var codeName: String, var version: String)
fun main(){
val proj = Project("Chilli Pepper", "2.1.0")
}Select an option to see the answer and solution.
Q250
Open questionfun main() {
val highScores = listOf(4000, 2000, 10200, 12000, 9030)
}Select an option to see the answer and solution.
Q251
Open questionfun showHashCode(obj: Any){
println("${obj.hasCode()}")
}
fun main() {
showHashCode(1)
}Select an option to see the answer and solution.
Q252
Open questionclass Employee
class Manager : Employee()Select an option to see the answer and solution.
Q253
Open questionval len: Int = if (x != null) x.length else -1Select an option to see the answer and solution.
Q254
Open questionfor (_____) {
println("There are $count butterflies.")
}Select an option to see the answer and solution.
Q255
Open questionopen class Attribute
class Href: Attribute()
class Src: Attribute()
class Alt: Attribute()
fun getAttribute(attribute: Attribute) : String {
return when (attribute) {
is Href -> "href"
is Alt -> "alt"
is Src -> "src"
else -> "unknown"
}
}Select an option to see the answer and solution.
Q256
Open questionfun add(a: Int, b: Int): Int {
return a + b
}Select an option to see the answer and solution.
Q257
Open questionimport com.tekadept.app.model.User
import com.tekadept.app.database.User
class UserService{
fun translateUser(user: com.tekadept.app.database.User): User =
com.tekadept.app.model.User("{user.last}")
}Select an option to see the answer and solution.
Q258
Open questionval a : String? = null
val b: String = "Hello World"
println(a==b)Select an option to see the answer and solution.
Q259
Open questionint num = 10;Select an option to see the answer and solution.
Q260
Open questionfun main() {
val x = 5
val y = 10
println(x + y)
}Select an option to see the answer and solution.