Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,16 @@ int result = Utils.triple(3);

```

> Kotlin

```kotlin
fun Int.triple(): Int {
return this * 3
}

var result = 3.triple()
```

---
## Generics
> Java
Expand Down Expand Up @@ -769,6 +779,8 @@ class SomeClass implements SomeInterface<List<String>> {

```

>Kotlin

```kotlin
interface SomeInterface<T> {
fun doSomething(data: T)
Expand All @@ -791,17 +803,6 @@ class SomeClass: SomeInterface<List<String>> {
}
```


> Kotlin

```kotlin
fun Int.triple(): Int {
return this * 3
}

var result = 3.triple()
```

---
## Defining uninitialized objects
> Java
Expand Down