© Peter Späth 2019
Peter SpäthLearn Kotlin for Android Developmenthttps://doi.org/10.1007/978-1-4842-4467-8_6

6. Comments in Kotlin Files

Peter Späth1 
Leipzig, Germany

Comments in computer language files are text that does not belong to the computer language itself and thus have no influence over the program execution, but provide a textual description of elements and constructs used in the program. Comments help the reader to understand your program.

From a technical point of view comments are easy to generate and differentiate from the program syntax itself.
  • Everything starting with a double slash // (not inside a string literal) to the end of the line is a comment.

  • Everything starting with a /* and ending with a */ (both not inside a string literal) ...

Get Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.