# Sınıflar

## 💠 Fonksiyonlar (Functions)

```kotlin
fun (var a : Int, val b : String?) : Int (return şekli) { ... }
```

## 🚄 Variable Arguments (...)

```kotlin
fun <T> asList(vararg ts: T): List<T> {
    val result = ArrayList<T>()
    for (t in ts) // ts is an Array
        result.add(t)
    return result
}
```

{% hint style="info" %}
‍🧙‍♂ Detaylı bilgi için [Variable number of arguments (Varargs)](https://kotlinlang.org/docs/reference/functions.html#variable-number-of-arguments-varargs) alanına bakabilirsin.
{% endhint %}

## 🍏 Inheritance (Extend Olayı)

```kotlin
class Sum:Div() { // : ile extend ediyoruz ve Div'in başına open yazıyoruz.
        fun sum(a: Int, b:Int):Int {
            return a + b
        }
    }

open class Div{
    fun div(a: Int, b:Int):Int {
        return a / b
    }
}
```


---

# 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://docs.yemreak.com/arsiv/kotlin/siniflar.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.
