Kotlin Quiz 4

Quiz
•
Computers
•
Professional Development
•
Hard
Mohamed Gamal
Used 2+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can the class have a function of its name?
true
false
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which declares an object correctly
class Human{}
fun main(){
val obj =
new Human()
}
class Human{}
fun main(){
val obj = Human()
}
class Human{}
fun main(){
val obj =
new Human();
}
class Human{}
fun main(){
val obj =
Human();
}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to declare static members and methods?
class A{
static color: String = "Red"
}
class A{
static val color: String = "Red"
}
class A{
static var color = "Red"
}
class A{
companion object{
val color = "Red"
}}
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
class A{
A(){
println("class A instantiated")
}
}
fun main(){
val a = A()
}
class A instantiated
"class A instantiated"
class A: "class A instantiated"
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
class Calculator(num1: Int, num2: Int){
fun add() = num1 + num2
}
fun main(){
val calc = Calculator(5,2)
println(calc.add())
}
7
9
11
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
which of the following is not OOP concept
Inheritance
Acbstraction
Polymorphism
Exception
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
fun main(){
val a = A()
println(10); println(5); println(8); }
class A{
init{
println(10)
println(5)
println(8)
}
}
10
5
8
10
5
8
10
5
8
10 5 8
10
5
8
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Snippets LookOver-round 2

Quiz
•
Professional Development
17 questions
Lección1 - JavaScript

Quiz
•
1st Grade - Professio...
14 questions
не лезь!!!!!!!!!!!!!!!!!!!!!!!!!

Quiz
•
Professional Development
10 questions
jQuery Recap Exercise

Quiz
•
Professional Development
11 questions
Alcance de Variables en Java

Quiz
•
Professional Development
15 questions
Basic CSS

Quiz
•
Professional Development
15 questions
Python Class 1

Quiz
•
Professional Development
10 questions
JAVA First Internal Assessment Test

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development