Single-line comments

As the name implies, these comments span a single line. Single-line comments are started with two backslashes (//). Upon compilation of your program, all characters coming after these slashes are ignored. Consider the following code:

val b: Int = 957 // This is a single line comment
// println(b)

The value held by b is never printed to the console because the function that performs the printing operation has been commented out.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.50.156