I have recently read about the const keyword, and I\'m so confused! I can\'t find any difference between const and the val keyword, I
const
val
Both val and const are immutable.
const is used to declare compile-time constants, whereas val for run-time constants.
const val VENDOR_NAME = "Kifayat Pashteen" // Assignment done at compile-time val PICon = getIP() // Assignment done at run-time