-4

What's the shortest quine written in Kotlin language?

See my implementation in answers, but I believe a shorter one exists.

Vadik Sirekanyan
  • 3,332
  • 1
  • 22
  • 29
  • 2
    I'm voting to close this question as off-topic because it belongs to [Programming Puzzles and Code Golf Stack Exchange](https://codegolf.stackexchange.com/). – Andrey Tyukin Aug 09 '18 at 09:58

1 Answers1

-4

Here is a straightforward implementation in kotlin script:

val a="val a=%c%s%c%nprint(a.format(34,a,34))"
print(a.format(34,a,34))

Tested with:

$ kotlinc -script quine.kts > out.kts
$ diff -s quine.kts out.kts
Files quine.kts and out.kts are identical

Number of chars:

$ stat quine.kts
Size: 71
Vadik Sirekanyan
  • 3,332
  • 1
  • 22
  • 29