-> Var are mutable and assigned with the values multiple times
-> Val is read-only and not purely immutable, val can be initialized at runtime/runtime constants
-> const will be assigned to immutable property of the class, only with the primitive datatypes and the string, not objects, const will be initialized at the compile time/compile time constants
-> val const - immutable + compile time
Comments
Post a Comment