From 19edd2912c508eb8611c160414e3a8517c1884e0 Mon Sep 17 00:00:00 2001 From: Droid Developer Date: Sat, 28 Aug 2021 00:11:18 +0530 Subject: [PATCH] Correct Formatting on Class Methods and Generics --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index aa2c3a0..289ff52 100644 --- a/README.md +++ b/README.md @@ -736,6 +736,18 @@ int result = Utils.triple(3); ``` +> Kotlin + +```kotlin +fun Int.triple(): Int { + return this * 3 +} + +var result = 3.triple() +``` + + + --- ## Generics > Java @@ -769,6 +781,8 @@ class SomeClass implements SomeInterface> { ``` +> Kotlin + ```kotlin interface SomeInterface { fun doSomething(data: T) @@ -791,17 +805,6 @@ class SomeClass: SomeInterface> { } ``` - -> Kotlin - -```kotlin -fun Int.triple(): Int { - return this * 3 -} - -var result = 3.triple() -``` - --- ## Defining uninitialized objects > Java