Moons of Neptune

Report a typo

Let's say you want to print the number of known satellites of Neptune, which is equal to 14. Which method is correct in terms of coding style conventions?

a)

println(14)

b)

var s = 14
println(s)

c)

const val SATELLITES_OF_NEPTUNE = 14

fun main() {
    println(SATELLITES_OF_NEPTUNE)
}

d)

print("Satellites of Neptune: ")
print(14)
Select one option from the list
___

Create a free account to access the full topic