Last active
December 24, 2021 10:51
-
-
Save Akhu/f2e3485d57dccd5ad0dcc23169593300 to your computer and use it in GitHub Desktop.
๐ New Year Code 2022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* You can edit, run, and share this code. | |
* play.kotlinlang.org | |
*/ | |
import kotlin.random.Random | |
class Celebration(val year: Int, val stillWithCovid: Boolean = false) { | |
override fun toString(): String { | |
return "Bonnes fรชtes & bonne annรฉe ${this.year} ! ๐ " + (if (stillWithCovid) "On va encore avoir pas mal de covid ๐ฆ " else "โ Ca va aller mieux !") | |
} | |
} | |
fun main(){ | |
val newYear = Celebration(year = 2022, stillWithCovid = Random.nextBoolean()) | |
println(newYear) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go to https://play.kotlinlang.org/, copy paste this code and run it to know the future ;)