# 2: Kotlin basics

### **Question 1**

Which of the following declares an unchangeable list of strings?

* [ ] `val school = arrayOf("shark", "salmon", "minnow")`
* [ ] `var school = arrayOf("shark", "salmon", "minnow")`
* [x] `val school = listOf("shark", "salmon", "minnow")`
* [ ] `val school = mutableListOf("shark", "salmon", "minnow")`

### **Question 2**

What will be the output of the following code?\
`for (i in 3..8 step 2) print(i)`

* [ ] 345678
* [ ] 468
* [ ] 38
* [x] 357

### **Question 3**

What is the purpose of the question mark in this code?\
`var rocks: Int? = 3`

* [x] The type of the variable `rocks` isn't fixed.
* [x] The variable `rocks` can be set to null.
* [ ] The variable `rocks` cannot be set to null.
* [ ] The variable `rocks` shouldn't be initialized right away.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cmmobile.gitbook.io/androidbook/ji-chu-ke-cheng-yu-xi/kotlin-lian-xi/google-code-labs/2-kotlin-basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
