Skip to main content

Posts

Showing posts from 2023

What is the difference between var and val and val const ?

-> 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