Skip to content

Instantly share code, notes, and snippets.

@Akhu
Last active December 24, 2021 10:51
Show Gist options
  • Save Akhu/f2e3485d57dccd5ad0dcc23169593300 to your computer and use it in GitHub Desktop.
Save Akhu/f2e3485d57dccd5ad0dcc23169593300 to your computer and use it in GitHub Desktop.
๐ŸŽ„ New Year Code 2022
/**
* 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)
}
@Akhu
Copy link
Author

Akhu commented Dec 21, 2021

Go to https://play.kotlinlang.org/, copy paste this code and run it to know the future ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment