© 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 
(1)
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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.