
Swift Kotlin Grammar Tests

Quiz
•
Science
•
University
•
Medium
Symbat Nurgaliyeva
Used 1+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following syntaxes is correct for creating a constant in Swift?
let constantName = "Value"
const constantName = "Value"
var constantName = "Value"
constant constantName = "Value"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to declare an immutable variable in Kotlin?
const val variableName = "Value"
let variableName = "Value"
var variableName = "Value"
val variableName = "Value"
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to check for null values in Kotlin?
== null
=== null
?.
!!
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of executing the expression "Hello".count() in Swift?
Compilation error
5
6
"Hello"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to create a method in a class in Kotlin?
fun methodName() {}
method methodName() {}
def methodName() {}
function methodName() {}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following syntaxes in Swift is used to declare an optional type?
var name: String?
var name: Optional(String)
var name: String!
var name: Optional<String>
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the !! operator mean in Kotlin?
Converts a nullable type to a non-nullable type, throwing an exception if null
Returns null
Checks the value for null
Sets a default value
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
CSS Basics

Quiz
•
University
14 questions
Chi Square Biology

Quiz
•
11th Grade - University
6 questions
Arrays I

Quiz
•
University
10 questions
Kuis Metlit 22/23

Quiz
•
University
10 questions
data_type

Quiz
•
12th Grade - University
15 questions
Biyoelementler-II

Quiz
•
University
8 questions
Python Fundamentals Explorer

Quiz
•
6th Grade - University
13 questions
BASIC STATS - MODULE 6

Quiz
•
University
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